home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: passwd+.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (old), directory passwd+/, mode 040755, uid 000115, gid 000024, size 00000000000, seconds 05220406606, comment: 0
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| TAR - Tape ARchive (directory)
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 70 61 73 73 77 64 2b 2f | 00 00 00 00 00 00 00 00 |passwd+/|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 30 34 30 37 | 35 35 00 00 30 30 30 31 |....0407|55..0001|
|00000070| 31 35 00 00 30 30 30 30 | 32 34 00 00 30 30 30 30 |15..0000|24..0000|
|00000080| 30 30 30 30 30 30 30 00 | 30 35 32 32 30 34 30 36 |0000000.|05220406|
|00000090| 36 30 36 00 30 31 31 30 | 35 32 00 20 35 00 00 00 |606.0110|52. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 20 20 20 20 20 30 00 | 00 62 69 73 68 6f 70 00 |. 0.|.bishop.|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00000160| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 70 61 73 73 77 64 2b 2f | 70 61 73 73 77 64 2e 48 |passwd+/|passwd.H|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 31 30 30 36 | 34 34 00 00 30 30 30 31 |....1006|44..0001|
|00000270| 31 35 00 00 30 30 30 30 | 32 34 00 00 30 30 30 30 |15..0000|24..0000|
|00000280| 30 30 31 37 36 34 30 00 | 30 35 31 35 37 37 33 36 |0017640.|05157736|
|00000290| 31 35 35 00 30 31 30 32 | 32 30 00 20 30 00 00 00 |155.0102|20. 0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 20 20 20 20 20 30 00 | 00 00 00 00 00 00 00 00 |. 0.|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00000360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 2f 2a 0a 20 2a 20 70 61 | 73 73 77 64 20 2d 2d 20 |/*. * pa|sswd -- |
|00000410| 61 20 73 75 70 65 72 20 | 64 6f 6f 70 65 72 20 70 |a super |dooper p|
|00000420| 61 73 73 77 6f 72 64 20 | 63 68 61 6e 67 65 72 0a |assword |changer.|
|00000430| 20 2a 20 69 74 20 63 68 | 65 63 6b 73 20 66 6f 72 | * it ch|ecks for|
|00000440| 20 73 70 65 63 69 66 69 | 63 61 6c 6c 79 20 62 61 | specifi|cally ba|
|00000450| 64 20 70 61 73 73 77 6f | 72 64 73 20 61 6e 64 20 |d passwo|rds and |
|00000460| 72 65 66 75 73 65 73 0a | 20 2a 20 74 6f 20 63 68 |refuses.| * to ch|
|00000470| 61 6e 67 65 20 61 20 70 | 61 73 73 77 6f 72 64 20 |ange a p|assword |
|00000480| 74 6f 20 74 68 65 6d 0a | 20 2a 0a 20 2a 20 74 68 |to them.| *. * th|
|00000490| 69 73 20 69 73 20 74 68 | 65 20 68 65 61 64 65 72 |is is th|e header|
|000004a0| 20 66 69 6c 65 0a 20 2a | 2f 0a 23 69 6e 63 6c 75 | file. *|/.#inclu|
|000004b0| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 23 69 6e |de <stdi|o.h>.#in|
|000004c0| 63 6c 75 64 65 20 3c 63 | 74 79 70 65 2e 68 3e 0a |clude <c|type.h>.|
|000004d0| 23 69 6e 63 6c 75 64 65 | 20 3c 67 72 70 2e 68 3e |#include| <grp.h>|
|000004e0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 70 77 64 2e 68 |.#includ|e <pwd.h|
|000004f0| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |>.#inclu|de <sys/|
|00000500| 74 79 70 65 73 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |types.h>|.#includ|
|00000510| 65 20 22 73 79 73 2e 68 | 22 0a 23 69 66 64 65 66 |e "sys.h|".#ifdef|
|00000520| 20 53 59 53 4c 4f 47 0a | 23 09 69 6e 63 6c 75 64 | SYSLOG.|#.includ|
|00000530| 65 20 3c 73 79 73 6c 6f | 67 2e 68 3e 0a 23 65 6e |e <syslo|g.h>.#en|
|00000540| 64 69 66 0a 0a 2f 2a 0a | 20 2a 20 74 68 65 20 66 |dif../*.| * the f|
|00000550| 6f 6c 6c 6f 77 69 6e 67 | 20 73 68 6f 75 6c 64 20 |ollowing| should |
|00000560| 62 65 20 72 65 73 65 74 | 20 74 6f 20 74 68 6f 73 |be reset| to thos|
|00000570| 65 20 70 61 72 61 6d 65 | 74 65 72 73 0a 20 2a 20 |e parame|ters. * |
|00000580| 74 68 61 74 20 66 69 74 | 20 62 65 73 74 20 77 69 |that fit| best wi|
|00000590| 74 68 20 79 6f 75 72 20 | 73 79 73 74 65 6d 0a 20 |th your |system. |
|000005a0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 44 45 46 50 57 |*/.#defi|ne DEFPW|
|000005b0| 46 49 4c 45 09 22 25 25 | 50 57 46 49 4c 45 25 25 |FILE."%%|PWFILE%%|
|000005c0| 22 09 09 2f 2a 20 70 61 | 73 73 77 6f 72 64 20 66 |"../* pa|ssword f|
|000005d0| 69 6c 65 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 50 |ile */.#|define P|
|000005e0| 57 54 45 53 54 46 49 4c | 45 09 22 25 25 50 57 54 |WTESTFIL|E."%%PWT|
|000005f0| 45 53 54 25 25 22 09 09 | 2f 2a 20 70 61 73 73 77 |EST%%"..|/* passw|
|00000600| 6f 72 64 20 74 65 73 74 | 20 66 69 6c 65 20 2a 2f |ord test| file */|
|00000610| 0a 23 64 65 66 69 6e 65 | 20 44 45 46 41 55 4c 54 |.#define| DEFAULT|
|00000620| 54 45 53 54 09 09 09 09 | 2f 2a 20 64 65 66 61 75 |TEST....|/* defau|
|00000630| 6c 74 20 74 65 73 74 20 | 69 66 20 6e 65 65 64 65 |lt test |if neede|
|00000640| 64 20 2a 2f 0a 23 64 65 | 66 69 6e 65 20 4c 47 5f |d */.#de|fine LG_|
|00000650| 44 45 46 41 55 4c 54 09 | 4c 47 5f 4e 4f 4e 45 09 |DEFAULT.|LG_NONE.|
|00000660| 09 09 2f 2a 20 64 65 66 | 61 75 6c 74 20 6c 6f 67 |../* def|ault log|
|00000670| 67 69 6e 67 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |ging */.|#define |
|00000680| 4c 47 5f 4f 55 54 44 45 | 46 09 22 3e 20 25 25 50 |LG_OUTDE|F."> %%P|
|00000690| 57 4c 4f 47 25 25 22 09 | 09 2f 2a 20 64 65 66 61 |WLOG%%".|./* defa|
|000006a0| 75 6c 74 20 6c 6f 67 67 | 69 6e 67 20 6c 6f 63 61 |ult logg|ing loca|
|000006b0| 74 69 6f 6e 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |tion */.|#define |
|000006c0| 4c 47 5f 49 4e 49 54 09 | 09 22 20 22 09 09 09 2f |LG_INIT.|." ".../|
|000006d0| 2a 20 69 6e 69 74 69 61 | 6c 20 6c 6f 67 67 69 6e |* initia|l loggin|
|000006e0| 67 20 2a 2f 0a 0a 2f 2a | 0a 20 2a 20 74 68 65 20 |g */../*|. * the |
|000006f0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 61 79 20 62 65 |followin|g may be|
|00000700| 20 63 68 61 6e 67 65 64 | 20 62 75 74 20 6f 64 64 | changed| but odd|
|00000710| 73 20 61 72 65 20 79 6f | 75 20 77 6f 6e 27 74 20 |s are yo|u won't |
|00000720| 77 61 6e 74 20 74 6f 0a | 20 2a 2f 0a 23 64 65 66 |want to.| */.#def|
|00000730| 69 6e 65 20 52 4f 4f 54 | 49 44 09 09 30 09 09 2f |ine ROOT|ID..0../|
|00000740| 2a 20 74 68 65 20 55 49 | 44 20 6f 66 20 74 68 65 |* the UI|D of the|
|00000750| 20 73 75 70 65 72 75 73 | 65 72 20 2a 2f 0a 23 64 | superus|er */.#d|
|00000760| 65 66 69 6e 65 20 50 57 | 53 49 47 43 48 41 52 53 |efine PW|SIGCHARS|
|00000770| 09 38 09 09 2f 2a 20 73 | 69 67 6e 69 66 69 63 61 |.8../* s|ignifica|
|00000780| 6e 74 20 63 68 61 72 61 | 63 74 65 72 73 20 2a 2f |nt chara|cters */|
|00000790| 0a 23 64 65 66 69 6e 65 | 20 4d 41 58 4c 4f 47 54 |.#define| MAXLOGT|
|000007a0| 4f 09 31 30 09 09 2f 2a | 20 6d 61 78 20 6e 75 6d |O.10../*| max num|
|000007b0| 62 65 72 20 6f 66 20 6f | 70 65 6e 20 6c 6f 67 73 |ber of o|pen logs|
|000007c0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 47 45 43 4f | */.#def|ine GECO|
|000007d0| 53 53 49 5a 45 09 31 30 | 30 09 09 2f 2a 20 6d 61 |SSIZE.10|0../* ma|
|000007e0| 78 20 73 69 7a 65 20 6f | 66 20 67 65 63 6f 73 20 |x size o|f gecos |
|000007f0| 66 69 65 6c 64 73 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |fields *|/../*. *|
|00000800| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 73 | the fol|lowing s|
|00000810| 68 6f 75 6c 64 20 4e 45 | 56 45 52 20 62 65 20 63 |hould NE|VER be c|
|00000820| 68 61 6e 67 65 64 20 28 | 75 6e 6c 65 73 73 20 79 |hanged (|unless y|
|00000830| 6f 75 27 72 65 20 73 75 | 69 63 69 64 61 6c 21 29 |ou're su|icidal!)|
|00000840| 0a 20 2a 2f 0a 23 69 66 | 6e 64 65 66 20 4e 55 56 |. */.#if|ndef NUV|
|00000850| 41 52 0a 09 2f 2a 2a 2a | 2a 20 57 41 52 4e 49 4e |AR../***|* WARNIN|
|00000860| 47 20 2d 2d 20 49 46 20 | 59 4f 55 20 43 48 41 4e |G -- IF |YOU CHAN|
|00000870| 47 45 20 54 48 49 53 20 | 52 45 4d 45 4d 42 45 52 |GE THIS |REMEMBER|
|00000880| 20 54 4f 20 44 45 4c 45 | 54 45 20 54 48 45 20 2a | TO DELE|TE THE *|
|00000890| 2a 2a 2a 2f 0a 09 2f 2a | 2a 2a 2a 20 09 09 20 41 |***/../*|*** .. A|
|000008a0| 50 50 52 4f 50 52 49 41 | 54 45 20 45 53 43 41 50 |PPROPRIA|TE ESCAP|
|000008b0| 45 53 20 49 4e 20 56 45 | 52 49 46 59 2e 43 20 20 |ES IN VE|RIFY.C |
|000008c0| 20 20 20 20 20 20 20 20 | 20 2a 2a 2a 2a 2f 0a 23 | | ****/.#|
|000008d0| 09 64 65 66 69 6e 65 20 | 4e 55 56 41 52 09 09 31 |.define |NUVAR..1|
|000008e0| 30 09 2f 2a 20 6e 75 6d | 62 65 72 20 6f 66 20 75 |0./* num|ber of u|
|000008f0| 73 65 72 20 64 65 66 69 | 6e 61 62 6c 65 20 65 73 |ser defi|nable es|
|00000900| 63 61 70 65 73 20 2a 2f | 0a 23 65 6e 64 69 66 0a |capes */|.#endif.|
|00000910| 0a 2f 2a 0a 20 2a 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |./*. *==|========|
|00000920| 20 4c 20 4f 20 47 20 47 | 20 49 20 4e 20 47 20 20 | L O G G| I N G |
|00000930| 4d 20 41 20 43 20 52 20 | 4f 20 53 20 3d 3d 3d 3d |M A C R |O S ====|
|00000940| 3d 3d 3d 3d 3d 3d 0a 20 | 2a 0a 20 2a 20 57 65 20 |======. |*. * We |
|00000950| 61 6c 6c 6f 77 20 74 68 | 65 20 75 73 65 72 20 74 |allow th|e user t|
|00000960| 6f 20 6c 6f 67 20 61 20 | 6e 75 6d 62 65 72 20 6f |o log a |number o|
|00000970| 66 20 77 61 79 73 0a 20 | 2a 20 54 68 65 20 6d 61 |f ways. |* The ma|
|00000980| 63 72 6f 73 20 62 65 6c | 6f 77 20 69 6e 64 69 63 |cros bel|ow indic|
|00000990| 61 74 65 20 68 69 73 20 | 63 68 6f 69 63 65 73 0a |ate his |choices.|
|000009a0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 4c 47 5f 46 | */.#def|ine LG_F|
|000009b0| 49 4c 45 09 09 30 78 30 | 31 09 09 2f 2a 20 74 6f |ILE..0x0|1../* to|
|000009c0| 20 61 20 66 69 6c 65 20 | 2a 2f 0a 23 64 65 66 69 | a file |*/.#defi|
|000009d0| 6e 65 20 4c 47 5f 50 49 | 50 45 09 09 30 78 30 32 |ne LG_PI|PE..0x02|
|000009e0| 09 09 2f 2a 20 74 6f 20 | 61 20 70 69 70 65 20 2a |../* to |a pipe *|
|000009f0| 2f 0a 23 64 65 66 69 6e | 65 20 4c 47 5f 53 54 44 |/.#defin|e LG_STD|
|00000a00| 45 52 52 09 30 78 30 34 | 09 09 2f 2a 20 74 6f 20 |ERR.0x04|../* to |
|00000a10| 73 74 64 65 72 72 20 2a | 2f 0a 09 09 09 09 09 2f |stderr *|/....../|
|00000a20| 2a 20 69 66 20 6e 6f 20 | 73 79 73 6c 6f 67 2c 20 |* if no |syslog, |
|00000a30| 77 72 69 74 65 20 74 6f | 20 65 72 72 6f 72 20 2a |write to| error *|
|00000a40| 2f 0a 23 69 66 64 65 66 | 20 53 59 53 4c 4f 47 0a |/.#ifdef| SYSLOG.|
|00000a50| 23 64 65 66 69 6e 65 09 | 4c 47 5f 53 59 53 4c 4f |#define.|LG_SYSLO|
|00000a60| 47 09 30 78 30 38 09 09 | 2f 2a 20 73 79 73 6c 6f |G.0x08..|/* syslo|
|00000a70| 67 3b 20 6d 61 79 20 6e | 6f 74 20 62 65 20 76 61 |g; may n|ot be va|
|00000a80| 6c 69 64 20 2a 2f 0a 23 | 65 6c 73 65 0a 23 64 65 |lid */.#|else.#de|
|00000a90| 66 69 6e 65 09 4c 47 5f | 53 59 53 4c 4f 47 09 4c |fine.LG_|SYSLOG.L|
|00000aa0| 47 5f 53 54 44 45 52 52 | 09 2f 2a 20 6e 6f 20 73 |G_STDERR|./* no s|
|00000ab0| 79 73 6c 6f 67 3a 20 73 | 65 6e 64 20 74 6f 20 73 |yslog: s|end to s|
|00000ac0| 74 64 65 72 72 20 2a 2f | 0a 23 65 6e 64 69 66 0a |tderr */|.#endif.|
|00000ad0| 0a 2f 2a 0a 20 2a 20 68 | 65 20 63 61 6e 20 6c 6f |./*. * h|e can lo|
|00000ae0| 67 20 73 65 76 65 72 61 | 6c 20 73 6f 72 74 73 20 |g severa|l sorts |
|00000af0| 6f 66 20 74 68 69 6e 67 | 73 3a 0a 20 2a 2f 0a 23 |of thing|s:. */.#|
|00000b00| 64 65 66 69 6e 65 09 4c | 47 5f 4e 4f 4e 45 09 09 |define.L|G_NONE..|
|00000b10| 30 78 30 30 09 09 2f 2a | 20 6c 6f 67 20 6e 6f 74 |0x00../*| log not|
|00000b20| 68 69 6e 67 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |hing */.|#define.|
|00000b30| 4c 47 5f 53 59 4e 54 41 | 58 09 30 78 30 31 09 09 |LG_SYNTA|X.0x01..|
|00000b40| 2f 2a 20 6c 6f 67 20 73 | 79 6e 74 61 78 20 65 72 |/* log s|yntax er|
|00000b50| 72 6f 72 73 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |rors */.|#define |
|00000b60| 4c 47 5f 55 53 45 09 09 | 30 78 30 32 09 09 2f 2a |LG_USE..|0x02../*|
|00000b70| 20 6c 6f 67 20 75 73 65 | 20 6f 66 20 70 72 6f 67 | log use| of prog|
|00000b80| 72 61 6d 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 4c |ram */.#|define L|
|00000b90| 47 5f 52 45 53 55 4c 54 | 09 30 78 30 34 09 09 2f |G_RESULT|.0x04../|
|00000ba0| 2a 20 6c 6f 67 20 72 65 | 73 75 6c 74 20 6f 66 20 |* log re|sult of |
|00000bb0| 72 75 6e 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 4c |run */.#|define L|
|00000bc0| 47 5f 49 54 45 4d 09 09 | 30 78 30 38 09 09 2f 2a |G_ITEM..|0x08../*|
|00000bd0| 20 6c 6f 67 20 77 68 79 | 20 74 65 73 74 20 66 61 | log why| test fa|
|00000be0| 69 6c 65 64 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |iled */.|#define |
|00000bf0| 4c 47 5f 44 45 42 55 47 | 09 30 78 31 30 09 09 2f |LG_DEBUG|.0x10../|
|00000c00| 2a 20 6c 6f 67 20 64 65 | 62 75 67 67 69 6e 67 20 |* log de|bugging |
|00000c10| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 2a 2f 0a 23 |informat|ion */.#|
|00000c20| 64 65 66 69 6e 65 20 4c | 47 5f 53 59 53 54 45 4d |define L|G_SYSTEM|
|00000c30| 09 30 78 32 30 09 09 2f | 2a 20 6c 6f 67 20 73 79 |.0x20../|* log sy|
|00000c40| 73 74 65 6d 20 70 72 6f | 62 6c 65 6d 73 20 2a 2f |stem pro|blems */|
|00000c50| 0a 23 64 65 66 69 6e 65 | 20 4c 47 5f 41 4c 4c 09 |.#define| LG_ALL.|
|00000c60| 09 30 78 33 66 09 09 2f | 2a 20 6c 6f 67 20 65 76 |.0x3f../|* log ev|
|00000c70| 65 72 79 74 68 69 6e 67 | 20 2a 2f 0a 2f 2a 0a 20 |erything| */./*. |
|00000c80| 2a 20 61 20 63 6f 6e 76 | 65 6e 69 65 6e 63 65 20 |* a conv|enience |
|00000c90| 74 6f 20 6d 61 6b 65 20 | 65 78 63 6c 75 64 69 6e |to make |excludin|
|00000ca0| 67 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 65 61 73 |g compon|ents eas|
|00000cb0| 79 0a 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 4c 47 |y. */.#d|efine LG|
|00000cc0| 5f 4e 45 47 09 09 27 21 | 27 09 09 2f 2a 20 6e 65 |_NEG..'!|'../* ne|
|00000cd0| 67 61 74 69 6f 6e 20 63 | 68 61 72 61 63 74 65 72 |gation c|haracter|
|00000ce0| 20 2a 2f 0a 2f 2a 0a 20 | 2a 20 73 6f 6d 65 20 67 | */./*. |* some g|
|00000cf0| 65 6e 65 72 61 6c 6c 79 | 20 75 73 65 66 75 6c 20 |enerally| useful |
|00000d00| 6d 61 63 72 6f 73 0a 20 | 2a 2f 0a 09 09 09 09 09 |macros. |*/......|
|00000d10| 2f 2a 20 65 6e 64 73 20 | 6c 6f 67 20 6b 65 79 77 |/* ends |log keyw|
|00000d20| 6f 72 64 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 6c |ord */.#|define l|
|00000d30| 6f 67 5f 65 6e 64 28 78 | 29 09 28 69 73 70 75 6e |og_end(x|).(ispun|
|00000d40| 63 74 28 28 78 29 29 7c | 7c 69 73 73 70 61 63 65 |ct((x))|||isspace|
|00000d50| 28 28 78 29 29 7c 7c 28 | 28 78 29 3d 3d 27 5c 30 |((x))||(|(x)=='\0|
|00000d60| 27 29 29 0a 23 64 65 66 | 69 6e 65 20 6c 6f 67 5f |')).#def|ine log_|
|00000d70| 73 65 74 28 78 2c 79 29 | 09 28 28 78 29 7c 3d 28 |set(x,y)|.((x)|=(|
|00000d80| 28 79 29 26 4c 47 5f 41 | 4c 4c 29 29 09 2f 2a 20 |(y)&LG_A|LL))./* |
|00000d90| 73 65 74 20 6f 6e 65 20 | 62 69 74 20 66 6f 72 20 |set one |bit for |
|00000da0| 6c 6f 67 67 69 6e 67 20 | 2a 2f 0a 23 64 65 66 69 |logging |*/.#defi|
|00000db0| 6e 65 20 6c 6f 67 5f 72 | 65 73 65 74 28 78 2c 79 |ne log_r|eset(x,y|
|00000dc0| 29 09 28 28 78 29 26 3d | 28 28 7e 28 79 29 29 26 |).((x)&=|((~(y))&|
|00000dd0| 4c 47 5f 41 4c 4c 29 29 | 09 2f 2a 20 63 6c 65 61 |LG_ALL))|./* clea|
|00000de0| 72 20 6f 6e 65 20 62 69 | 74 20 66 6f 72 20 6c 6f |r one bi|t for lo|
|00000df0| 67 67 69 6e 67 20 2a 2f | 0a 23 64 65 66 69 6e 65 |gging */|.#define|
|00000e00| 09 6c 6f 67 5f 74 65 73 | 74 28 78 2c 79 29 09 28 |.log_tes|t(x,y).(|
|00000e10| 28 28 78 29 26 28 79 29 | 29 3d 3d 28 79 29 29 09 |((x)&(y)|)==(y)).|
|00000e20| 2f 2a 20 31 20 69 66 20 | 74 6f 20 6c 6f 67 20 79 |/* 1 if |to log y|
|00000e30| 20 2a 2f 0a 2f 2a 0a 20 | 2a 20 74 68 65 73 65 20 | */./*. |* these |
|00000e40| 6d 61 63 72 6f 73 20 64 | 6f 20 74 68 65 20 61 63 |macros d|o the ac|
|00000e50| 74 75 61 6c 20 6c 6f 67 | 67 69 6e 67 0a 20 2a 20 |tual log|ging. * |
|00000e60| 61 6e 64 20 61 72 65 20 | 68 65 72 65 20 74 6f 20 |and are |here to |
|00000e70| 6b 65 65 70 20 74 68 65 | 20 6c 6f 67 67 69 6e 67 |keep the| logging|
|00000e80| 20 66 75 6e 63 74 69 6f | 6e 73 20 73 69 6d 70 6c | functio|ns simpl|
|00000e90| 65 0a 20 2a 20 74 68 65 | 79 20 61 72 65 20 6e 61 |e. * the|y are na|
|00000ea0| 6d 65 64 20 4c 4f 47 6e | 2c 20 77 68 65 72 65 20 |med LOGn|, where |
|00000eb0| 6e 20 69 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |n is the| number |
|00000ec0| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 20 74 6f 20 |of argum|ents to |
|00000ed0| 73 70 72 69 6e 74 66 0a | 20 2a 2f 0a 23 64 65 66 |sprintf.| */.#def|
|00000ee0| 69 6e 65 20 4c 4f 47 30 | 28 79 2c 20 7a 29 09 6c |ine LOG0|(y, z).l|
|00000ef0| 6f 67 66 75 6e 63 28 79 | 2c 20 7a 29 0a 23 64 65 |ogfunc(y|, z).#de|
|00000f00| 66 69 6e 65 20 4c 4f 47 | 31 28 79 2c 20 7a 2c 20 |fine LOG|1(y, z, |
|00000f10| 61 29 09 7b 09 09 09 09 | 09 5c 0a 09 09 09 63 68 |a).{....|.\....ch|
|00000f20| 61 72 20 74 62 75 66 5b | 42 55 46 53 49 5a 5d 3b |ar tbuf[|BUFSIZ];|
|00000f30| 09 09 09 5c 0a 09 09 09 | 53 50 52 49 4e 54 46 28 |...\....|SPRINTF(|
|00000f40| 74 62 75 66 2c 20 7a 2c | 20 61 29 3b 09 09 09 5c |tbuf, z,| a);...\|
|00000f50| 0a 09 09 09 6c 6f 67 66 | 75 6e 63 28 79 2c 20 74 |....logf|unc(y, t|
|00000f60| 62 75 66 29 3b 09 09 09 | 5c 0a 09 09 7d 0a 23 64 |buf);...|\...}.#d|
|00000f70| 65 66 69 6e 65 20 4c 4f | 47 32 28 79 2c 20 7a 2c |efine LO|G2(y, z,|
|00000f80| 20 61 2c 20 62 29 09 7b | 09 09 09 09 5c 0a 09 09 | a, b).{|....\...|
|00000f90| 09 63 68 61 72 20 74 62 | 75 66 5b 42 55 46 53 49 |.char tb|uf[BUFSI|
|00000fa0| 5a 5d 3b 09 09 09 5c 0a | 09 09 09 53 50 52 49 4e |Z];...\.|...SPRIN|
|00000fb0| 54 46 28 74 62 75 66 2c | 20 7a 2c 20 61 2c 20 62 |TF(tbuf,| z, a, b|
|00000fc0| 29 3b 09 09 09 5c 0a 09 | 09 09 6c 6f 67 66 75 6e |);...\..|..logfun|
|00000fd0| 63 28 79 2c 20 74 62 75 | 66 29 3b 09 09 09 5c 0a |c(y, tbu|f);...\.|
|00000fe0| 09 09 7d 0a 23 64 65 66 | 69 6e 65 20 4c 4f 47 33 |..}.#def|ine LOG3|
|00000ff0| 28 79 2c 20 7a 2c 20 61 | 2c 20 62 2c 20 63 29 09 |(y, z, a|, b, c).|
|00001000| 7b 09 09 09 09 5c 0a 09 | 09 09 63 68 61 72 20 74 |{....\..|..char t|
|00001010| 62 75 66 5b 42 55 46 53 | 49 5a 5d 3b 09 09 09 5c |buf[BUFS|IZ];...\|
|00001020| 0a 09 09 09 53 50 52 49 | 4e 54 46 28 74 62 75 66 |....SPRI|NTF(tbuf|
|00001030| 2c 20 7a 2c 20 61 2c 20 | 62 2c 20 63 29 3b 09 09 |, z, a, |b, c);..|
|00001040| 5c 0a 09 09 09 6c 6f 67 | 66 75 6e 63 28 79 2c 20 |\....log|func(y, |
|00001050| 74 62 75 66 29 3b 09 09 | 09 5c 0a 09 09 7d 0a 0a |tbuf);..|.\...}..|
|00001060| 2f 2a 0a 20 2a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 20 |/*. *===|======= |
|00001070| 45 20 53 20 43 20 41 20 | 50 20 45 20 20 20 53 20 |E S C A |P E S |
|00001080| 45 20 51 20 55 20 45 20 | 4e 20 43 20 45 20 53 20 |E Q U E |N C E S |
|00001090| 20 20 46 20 4f 20 52 20 | 20 20 54 20 45 20 53 20 | F O R | T E S |
|000010a0| 54 20 53 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 20 |T S ====|======. |
|000010b0| 2a 0a 20 2a 20 74 68 65 | 73 65 20 74 65 6c 6c 20 |*. * the|se tell |
|000010c0| 68 6f 77 20 74 6f 20 61 | 63 63 65 73 73 20 65 73 |how to a|ccess es|
|000010d0| 63 61 70 65 20 73 65 71 | 75 65 6e 63 65 73 0a 20 |cape seq|uences. |
|000010e0| 2a 2f 0a 23 64 65 66 69 | 6e 65 09 46 5f 41 53 49 |*/.#defi|ne.F_ASI|
|000010f0| 53 09 09 30 09 2f 2a 20 | 69 6e 73 65 72 74 20 74 |S..0./* |insert t|
|00001100| 68 65 20 73 74 72 69 6e | 67 20 61 73 20 69 73 20 |he strin|g as is |
|00001110| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 46 5f 4e 55 4d |*/.#defi|ne F_NUM|
|00001120| 42 45 52 09 31 09 2f 2a | 20 69 6e 73 65 72 74 20 |BER.1./*| insert |
|00001130| 74 68 65 20 6c 65 6e 67 | 74 68 20 6f 66 20 74 68 |the leng|th of th|
|00001140| 65 20 73 74 72 69 6e 67 | 20 2a 2f 0a 23 64 65 66 |e string| */.#def|
|00001150| 69 6e 65 20 46 5f 55 50 | 50 45 52 09 09 32 09 2f |ine F_UP|PER..2./|
|00001160| 2a 20 69 6e 73 65 72 74 | 20 74 68 65 20 73 74 72 |* insert| the str|
|00001170| 69 6e 67 20 69 6e 20 75 | 70 70 65 72 20 63 61 73 |ing in u|pper cas|
|00001180| 65 20 2a 2f 0a 23 64 65 | 66 69 6e 65 20 46 5f 4c |e */.#de|fine F_L|
|00001190| 4f 57 45 52 09 09 33 09 | 2f 2a 20 69 6e 73 65 72 |OWER..3.|/* inser|
|000011a0| 74 20 74 68 65 20 73 74 | 72 69 6e 67 20 69 6e 20 |t the st|ring in |
|000011b0| 6c 6f 77 65 72 20 63 61 | 73 65 20 2a 2f 0a 23 64 |lower ca|se */.#d|
|000011c0| 65 66 69 6e 65 20 46 5f | 46 49 52 53 54 09 09 34 |efine F_|FIRST..4|
|000011d0| 09 2f 2a 20 69 6e 73 65 | 72 74 20 74 68 65 20 73 |./* inse|rt the s|
|000011e0| 74 72 69 6e 67 20 66 69 | 72 73 74 20 63 61 70 69 |tring fi|rst capi|
|000011f0| 74 61 6c 69 7a 65 64 20 | 2a 2f 0a 0a 2f 2a 0a 20 |talized |*/../*. |
|00001200| 2a 20 61 20 6e 75 6d 62 | 65 72 20 6f 72 20 61 20 |* a numb|er or a |
|00001210| 73 74 72 69 6e 67 3f 0a | 20 2a 2f 0a 23 64 65 66 |string?.| */.#def|
|00001220| 69 6e 65 09 54 59 5f 53 | 54 52 09 09 30 09 2f 2a |ine.TY_S|TR..0./*|
|00001230| 20 73 74 72 69 6e 67 20 | 2a 2f 0a 23 64 65 66 69 | string |*/.#defi|
|00001240| 6e 65 09 54 59 5f 4e 55 | 4d 09 09 31 09 2f 2a 20 |ne.TY_NU|M..1./* |
|00001250| 6e 75 6d 62 65 72 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |number *|/../*. *|
|00001260| 20 6d 61 70 20 75 70 70 | 65 72 20 63 61 73 65 20 | map upp|er case |
|00001270| 74 6f 20 6c 6f 77 65 72 | 20 63 61 73 65 0a 20 2a |to lower| case. *|
|00001280| 2f 0a 23 64 65 66 69 6e | 65 20 6c 6f 77 63 61 73 |/.#defin|e lowcas|
|00001290| 65 28 78 29 09 28 69 73 | 75 70 70 65 72 28 28 78 |e(x).(is|upper((x|
|000012a0| 29 29 20 3f 20 74 6f 6c | 6f 77 65 72 28 28 78 29 |)) ? tol|ower((x)|
|000012b0| 29 20 3a 20 28 78 29 29 | 0a 23 64 65 66 69 6e 65 |) : (x))|.#define|
|000012c0| 20 75 70 63 61 73 65 28 | 78 29 09 28 69 73 6c 6f | upcase(|x).(islo|
|000012d0| 77 65 72 28 28 78 29 29 | 20 3f 20 74 6f 75 70 70 |wer((x))| ? toupp|
|000012e0| 65 72 28 28 78 29 29 20 | 3a 20 28 78 29 29 0a 0a |er((x)) |: (x))..|
|000012f0| 2f 2a 0a 20 2a 20 73 74 | 72 75 63 74 75 72 65 20 |/*. * st|ructure |
|00001300| 74 6f 20 68 6f 6c 64 20 | 22 25 22 20 61 6e 64 20 |to hold |"%" and |
|00001310| 22 23 22 20 65 73 63 61 | 70 65 73 20 28 69 65 2c |"#" esca|pes (ie,|
|00001320| 20 69 6e 74 65 72 6e 61 | 6c 20 76 61 72 69 61 62 | interna|l variab|
|00001330| 6c 65 73 29 0a 20 2a 2f | 0a 73 74 72 75 63 74 20 |les). */|.struct |
|00001340| 69 6e 74 76 61 72 20 7b | 0a 09 63 68 61 72 20 6e |intvar {|..char n|
|00001350| 61 6d 65 3b 09 09 2f 2a | 20 69 6e 74 65 72 6e 61 |ame;../*| interna|
|00001360| 6c 20 76 61 72 69 61 62 | 6c 65 20 6e 61 6d 65 20 |l variab|le name |
|00001370| 74 6f 20 74 68 65 20 75 | 73 65 72 20 2a 2f 0a 09 |to the u|ser */..|
|00001380| 69 6e 74 20 6e 73 74 79 | 70 65 3b 09 09 2f 2a 20 |int nsty|pe;../* |
|00001390| 31 20 69 66 20 61 20 6e | 75 6d 62 65 72 2c 20 30 |1 if a n|umber, 0|
|000013a0| 20 69 66 20 61 20 73 74 | 72 69 6e 67 20 2a 2f 0a | if a st|ring */.|
|000013b0| 09 63 68 61 72 20 2a 73 | 74 72 69 6e 67 3b 09 09 |.char *s|tring;..|
|000013c0| 2f 2a 20 73 74 72 69 6e | 67 20 76 61 6c 75 65 20 |/* strin|g value |
|000013d0| 2a 2f 0a 09 63 68 61 72 | 20 2a 6c 65 6e 67 74 68 |*/..char| *length|
|000013e0| 3b 09 09 2f 2a 20 6c 65 | 6e 67 74 68 20 28 61 73 |;../* le|ngth (as|
|000013f0| 20 61 20 73 74 72 69 6e | 67 29 20 2a 2f 0a 09 69 | a strin|g) */..i|
|00001400| 6e 74 20 75 73 65 72 73 | 65 74 3b 09 09 2f 2a 20 |nt users|et;../* |
|00001410| 31 20 69 66 20 74 68 69 | 73 20 63 61 6e 20 62 65 |1 if thi|s can be|
|00001420| 20 72 65 73 65 74 20 2a | 2f 0a 09 63 68 61 72 20 | reset *|/..char |
|00001430| 2a 70 72 6f 6d 70 74 3b | 09 09 2f 2a 20 61 20 70 |*prompt;|../* a p|
|00001440| 72 6f 6d 70 74 2c 20 69 | 66 20 6e 65 65 64 65 64 |rompt, i|f needed|
|00001450| 20 2a 2f 0a 7d 3b 0a 09 | 09 09 2f 2a 20 71 75 69 | */.};..|../* qui|
|00001460| 63 6b 20 61 73 73 69 67 | 6e 6d 65 6e 74 20 6d 61 |ck assig|nment ma|
|00001470| 63 72 6f 73 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |cros */.|#define.|
|00001480| 49 56 53 41 53 53 49 47 | 4e 28 78 2c 20 79 29 09 |IVSASSIG|N(x, y).|
|00001490| 7b 09 09 09 09 09 09 5c | 0a 09 09 72 65 67 69 73 |{......\|...regis|
|000014a0| 74 65 72 20 73 74 72 75 | 63 74 20 69 6e 74 76 61 |ter stru|ct intva|
|000014b0| 72 20 2a 69 70 78 20 3d | 20 66 69 6e 64 69 76 28 |r *ipx =| findiv(|
|000014c0| 78 29 3b 09 09 5c 0a 09 | 09 69 70 78 2d 3e 73 74 |x);..\..|.ipx->st|
|000014d0| 72 69 6e 67 20 3d 20 73 | 74 72 73 61 76 65 28 28 |ring = s|trsave((|
|000014e0| 79 29 29 3b 09 09 09 09 | 5c 0a 09 09 69 66 20 28 |y));....|\...if (|
|000014f0| 28 79 29 20 3d 3d 20 43 | 48 5f 4e 55 4c 4c 29 09 |(y) == C|H_NULL).|
|00001500| 69 70 78 2d 3e 6c 65 6e | 67 74 68 20 3d 20 73 74 |ipx->len|gth = st|
|00001510| 72 73 61 76 65 28 43 48 | 5f 4e 55 4c 4c 29 3b 09 |rsave(CH|_NULL);.|
|00001520| 5c 0a 09 09 65 6c 73 65 | 09 09 09 69 70 78 2d 3e |\...else|...ipx->|
|00001530| 6c 65 6e 67 74 68 20 3d | 20 74 6f 6e 75 6d 28 73 |length =| tonum(s|
|00001540| 74 72 6c 65 6e 28 79 29 | 29 3b 09 5c 0a 09 7d 0a |trlen(y)|);.\..}.|
|00001550| 23 64 65 66 69 6e 65 09 | 49 56 53 50 41 53 53 49 |#define.|IVSPASSI|
|00001560| 47 4e 28 78 2c 20 79 29 | 09 7b 09 09 09 09 09 5c |GN(x, y)|.{.....\|
|00001570| 0a 09 09 28 78 29 2d 3e | 73 74 72 69 6e 67 20 3d |...(x)->|string =|
|00001580| 20 73 74 72 73 61 76 65 | 28 28 79 29 29 3b 09 09 | strsave|((y));..|
|00001590| 09 09 5c 0a 09 09 69 66 | 20 28 28 79 29 20 3d 3d |..\...if| ((y) ==|
|000015a0| 20 43 48 5f 4e 55 4c 4c | 29 09 28 78 29 2d 3e 6c | CH_NULL|).(x)->l|
|000015b0| 65 6e 67 74 68 20 3d 20 | 73 74 72 73 61 76 65 28 |ength = |strsave(|
|000015c0| 43 48 5f 4e 55 4c 4c 29 | 3b 09 5c 0a 09 09 65 6c |CH_NULL)|;.\...el|
|000015d0| 73 65 09 09 09 28 78 29 | 2d 3e 6c 65 6e 67 74 68 |se...(x)|->length|
|000015e0| 20 3d 20 74 6f 6e 75 6d | 28 73 74 72 6c 65 6e 28 | = tonum|(strlen(|
|000015f0| 79 29 29 3b 09 5c 0a 09 | 7d 0a 23 64 65 66 69 6e |y));.\..|}.#defin|
|00001600| 65 09 49 56 4e 41 53 53 | 49 47 4e 28 78 2c 20 79 |e.IVNASS|IGN(x, y|
|00001610| 2c 20 7a 29 20 7b 09 09 | 09 09 09 09 5c 0a 09 09 |, z) {..|....\...|
|00001620| 72 65 67 69 73 74 65 72 | 20 73 74 72 75 63 74 20 |register| struct |
|00001630| 69 6e 74 76 61 72 20 2a | 69 70 78 20 3d 20 66 69 |intvar *|ipx = fi|
|00001640| 6e 64 69 76 28 78 29 3b | 09 09 5c 0a 09 09 69 70 |ndiv(x);|..\...ip|
|00001650| 78 2d 3e 73 74 72 69 6e | 67 20 3d 20 74 6f 6e 75 |x->strin|g = tonu|
|00001660| 6d 28 28 79 29 29 3b 09 | 09 09 09 5c 0a 09 09 69 |m((y));.|...\...i|
|00001670| 70 78 2d 3e 6c 65 6e 67 | 74 68 20 3d 20 74 6f 6e |px->leng|th = ton|
|00001680| 75 6d 28 28 7a 29 29 3b | 09 09 09 09 5c 0a 09 7d |um((z));|....\..}|
|00001690| 0a 0a 2f 2a 0a 20 2a 3d | 3d 3d 3d 3d 3d 3d 3d 3d |../*. *=|========|
|000016a0| 3d 20 4e 20 55 20 4c 20 | 4c 20 20 20 50 20 4f 20 |= N U L |L P O |
|000016b0| 49 20 4e 20 54 20 45 20 | 52 20 53 20 3d 3d 3d 3d |I N T E |R S ====|
|000016c0| 3d 3d 3d 3d 3d 3d 0a 20 | 2a 0a 20 2a 20 4e 55 4c |======. |*. * NUL|
|000016d0| 4c 20 70 6f 69 6e 74 65 | 72 73 20 2d 2d 20 74 68 |L pointe|rs -- th|
|000016e0| 65 73 65 20 61 72 65 20 | 75 73 65 64 20 74 6f 20 |ese are |used to |
|000016f0| 73 68 75 74 20 6c 69 6e | 74 20 75 70 0a 20 2a 2f |shut lin|t up. */|
|00001700| 0a 23 64 65 66 69 6e 65 | 20 43 48 5f 4e 55 4c 4c |.#define| CH_NULL|
|00001710| 09 28 28 63 68 61 72 20 | 2a 29 20 4e 55 4c 4c 29 |.((char |*) NULL)|
|00001720| 09 09 2f 2a 20 4e 55 4c | 4c 20 63 68 61 72 61 63 |../* NUL|L charac|
|00001730| 74 65 72 20 70 6f 69 6e | 74 65 72 20 2a 2f 0a 23 |ter poin|ter */.#|
|00001740| 64 65 66 69 6e 65 20 46 | 49 5f 4e 55 4c 4c 20 28 |define F|I_NULL (|
|00001750| 28 46 49 4c 45 20 2a 29 | 20 4e 55 4c 4c 29 09 09 |(FILE *)| NULL)..|
|00001760| 2f 2a 20 4e 55 4c 4c 20 | 66 69 6c 65 20 70 6f 69 |/* NULL |file poi|
|00001770| 6e 74 65 72 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |nter */.|#define |
|00001780| 47 52 5f 4e 55 4c 4c 20 | 28 28 73 74 72 75 63 74 |GR_NULL |((struct|
|00001790| 20 67 72 6f 75 70 20 2a | 29 20 4e 55 4c 4c 29 09 | group *|) NULL).|
|000017a0| 2f 2a 20 4e 55 4c 4c 20 | 67 72 6f 75 70 20 73 74 |/* NULL |group st|
|000017b0| 72 75 63 74 75 72 65 20 | 70 6f 69 6e 74 65 72 20 |ructure |pointer |
|000017c0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 49 56 5f 4e 55 |*/.#defi|ne IV_NU|
|000017d0| 4c 4c 20 28 28 73 74 72 | 75 63 74 20 69 6e 74 76 |LL ((str|uct intv|
|000017e0| 61 72 20 2a 29 20 4e 55 | 4c 4c 29 2f 2a 20 4e 55 |ar *) NU|LL)/* NU|
|000017f0| 4c 4c 20 65 73 63 61 70 | 65 20 73 74 72 75 63 74 |LL escap|e struct|
|00001800| 75 72 65 20 70 6f 69 6e | 74 65 72 20 2a 2f 0a 23 |ure poin|ter */.#|
|00001810| 64 65 66 69 6e 65 20 50 | 57 5f 4e 55 4c 4c 20 28 |define P|W_NULL (|
|00001820| 28 73 74 72 75 63 74 20 | 70 61 73 73 77 64 20 2a |(struct |passwd *|
|00001830| 29 20 4e 55 4c 4c 29 2f | 2a 20 4e 55 4c 4c 20 70 |) NULL)/|* NULL p|
|00001840| 61 73 73 77 6f 72 64 20 | 73 74 72 75 63 74 75 72 |assword |structur|
|00001850| 65 20 70 6f 69 6e 74 65 | 72 20 2a 2f 0a 23 64 65 |e pointe|r */.#de|
|00001860| 66 69 6e 65 20 54 49 5f | 4e 55 4c 4c 20 28 28 74 |fine TI_|NULL ((t|
|00001870| 69 6d 65 5f 74 20 2a 29 | 20 4e 55 4c 4c 29 09 2f |ime_t *)| NULL)./|
|00001880| 2a 20 4e 55 4c 4c 20 74 | 69 6d 65 20 70 6f 69 6e |* NULL t|ime poin|
|00001890| 74 65 72 20 2a 2f 0a 0a | 2f 2a 0a 20 2a 3d 3d 3d |ter */..|/*. *===|
|000018a0| 3d 3d 3d 3d 3d 3d 3d 20 | 44 20 45 20 43 20 4c 20 |======= |D E C L |
|000018b0| 41 20 52 20 41 20 54 20 | 49 20 4f 20 4e 20 53 20 |A R A T |I O N S |
|000018c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 20 2a 0a 20 2a |========|==. *. *|
|000018d0| 20 67 6c 6f 62 61 6c 73 | 0a 20 2a 2f 0a 65 78 74 | globals|. */.ext|
|000018e0| 65 72 6e 20 63 68 61 72 | 20 72 75 6e 6e 65 72 5b |ern char| runner[|
|000018f0| 5d 3b 09 09 2f 2a 20 77 | 68 6f 20 69 73 20 72 75 |];../* w|ho is ru|
|00001900| 6e 6e 69 6e 67 20 74 68 | 69 73 20 70 72 6f 67 72 |nning th|is progr|
|00001910| 61 6d 20 2a 2f 0a 65 78 | 74 65 72 6e 20 63 68 61 |am */.ex|tern cha|
|00001920| 72 20 75 73 65 72 5b 5d | 3b 09 09 2f 2a 20 6e 61 |r user[]|;../* na|
|00001930| 6d 65 20 6f 66 20 75 73 | 65 72 20 2a 2f 0a 65 78 |me of us|er */.ex|
|00001940| 74 65 72 6e 20 63 68 61 | 72 20 70 61 73 73 77 6f |tern cha|r passwo|
|00001950| 72 64 5b 5d 3b 09 09 2f | 2a 20 6e 65 77 20 70 61 |rd[];../|* new pa|
|00001960| 73 73 77 6f 72 64 20 2a | 2f 0a 65 78 74 65 72 6e |ssword *|/.extern|
|00001970| 20 63 68 61 72 20 6f 6c | 64 70 61 73 73 77 6f 72 | char ol|dpasswor|
|00001980| 64 5b 5d 3b 09 2f 2a 20 | 63 75 72 72 65 6e 74 20 |d[];./* |current |
|00001990| 70 61 73 73 77 6f 72 64 | 20 2a 2f 0a 65 78 74 65 |password| */.exte|
|000019a0| 72 6e 20 73 74 72 75 63 | 74 20 70 61 73 73 77 64 |rn struc|t passwd|
|000019b0| 20 2a 70 77 69 6e 66 6f | 3b 09 2f 2a 20 61 73 73 | *pwinfo|;./* ass|
|000019c0| 6f 63 69 61 74 65 64 20 | 70 61 73 73 77 6f 72 64 |ociated |password|
|000019d0| 20 73 74 72 75 63 74 75 | 72 65 20 2a 2f 0a 65 78 | structu|re */.ex|
|000019e0| 74 65 72 6e 20 63 68 61 | 72 20 2a 70 72 6f 67 6e |tern cha|r *progn|
|000019f0| 61 6d 65 3b 09 09 2f 2a | 20 70 72 6f 67 72 61 6d |ame;../*| program|
|00001a00| 20 6e 61 6d 65 20 2a 2f | 0a 65 78 74 65 72 6e 20 | name */|.extern |
|00001a10| 63 68 61 72 20 2a 70 77 | 64 66 69 6c 65 3b 09 09 |char *pw|dfile;..|
|00001a20| 2f 2a 20 70 61 73 73 77 | 6f 72 64 20 66 69 6c 65 |/* passw|ord file|
|00001a30| 20 2a 2f 0a 65 78 74 65 | 72 6e 20 63 68 61 72 20 | */.exte|rn char |
|00001a40| 70 77 74 65 73 74 5b 5d | 3b 09 09 2f 2a 20 70 61 |pwtest[]|;../* pa|
|00001a50| 73 73 77 6f 72 64 20 74 | 65 73 74 20 66 69 6c 65 |ssword t|est file|
|00001a60| 20 2a 2f 0a 65 78 74 65 | 72 6e 20 69 6e 74 20 70 | */.exte|rn int p|
|00001a70| 77 73 69 67 3b 09 09 2f | 2a 20 6e 75 6d 62 65 72 |wsig;../|* number|
|00001a80| 20 6f 66 20 73 69 67 6e | 69 66 69 63 61 6e 74 20 | of sign|ificant |
|00001a90| 63 68 61 72 73 20 69 6e | 20 70 61 73 73 77 6f 72 |chars in| passwor|
|00001aa0| 64 20 2a 2f 0a 65 78 74 | 65 72 6e 20 75 6e 73 69 |d */.ext|ern unsi|
|00001ab0| 67 6e 65 64 20 69 6e 74 | 20 6c 6f 67 67 69 6e 67 |gned int| logging|
|00001ac0| 3b 09 2f 2a 20 6c 6f 67 | 67 69 6e 67 20 6c 65 76 |;./* log|ging lev|
|00001ad0| 65 6c 20 2a 2f 0a 65 78 | 74 65 72 6e 20 69 6e 74 |el */.ex|tern int|
|00001ae0| 20 6c 69 6e 65 63 74 3b | 09 09 2f 2a 20 6c 69 6e | linect;|../* lin|
|00001af0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 65 73 74 |e number| of test|
|00001b00| 20 66 69 6c 65 20 2a 2f | 0a 65 78 74 65 72 6e 20 | file */|.extern |
|00001b10| 73 74 72 75 63 74 20 69 | 6e 74 76 61 72 20 69 76 |struct i|ntvar iv|
|00001b20| 5b 5d 3b 09 2f 2a 20 69 | 6e 74 65 72 6e 61 6c 20 |[];./* i|nternal |
|00001b30| 76 61 72 69 61 62 6c 65 | 73 20 2a 2f 0a 65 78 74 |variable|s */.ext|
|00001b40| 65 72 6e 20 69 6e 74 20 | 70 66 5f 65 72 72 6e 6f |ern int |pf_errno|
|00001b50| 3b 09 09 2f 2a 20 73 79 | 73 74 65 6d 20 65 72 72 |;../* sy|stem err|
|00001b60| 6f 72 20 66 72 6f 6d 20 | 75 70 64 61 74 65 5f 70 |or from |update_p|
|00001b70| 77 64 28 29 20 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 73 |wd() */.|./*. * s|
|00001b80| 79 73 74 65 6d 20 76 61 | 72 69 61 62 6c 65 73 0a |ystem va|riables.|
|00001b90| 20 2a 2f 0a 65 78 74 65 | 72 6e 20 69 6e 74 20 65 | */.exte|rn int e|
|00001ba0| 72 72 6e 6f 3b 09 09 2f | 2a 20 73 79 73 74 65 6d |rrno;../|* system|
|00001bb0| 20 65 72 72 6f 72 20 6e | 75 6d 62 65 72 20 2a 2f | error n|umber */|
|00001bc0| 0a 65 78 74 65 72 6e 20 | 69 6e 74 20 73 79 73 5f |.extern |int sys_|
|00001bd0| 6e 65 72 72 3b 09 09 2f | 2a 20 6e 75 6d 62 65 72 |nerr;../|* number|
|00001be0| 20 6f 66 20 73 79 73 74 | 65 6d 20 65 72 72 6f 72 | of syst|em error|
|00001bf0| 73 20 2a 2f 0a 65 78 74 | 65 72 6e 20 63 68 61 72 |s */.ext|ern char|
|00001c00| 20 2a 73 79 73 5f 65 72 | 72 6c 69 73 74 5b 5d 3b | *sys_er|rlist[];|
|00001c10| 09 2f 2a 20 64 65 73 63 | 72 69 70 74 69 6f 6e 73 |./* desc|riptions|
|00001c20| 20 6f 66 20 73 79 73 74 | 65 6d 20 65 72 72 6f 72 | of syst|em error|
|00001c30| 73 20 2a 2f 0a 0a 2f 2a | 0a 20 2a 20 69 6e 74 65 |s */../*|. * inte|
|00001c40| 72 6e 61 6c 20 28 66 6f | 72 77 61 72 64 29 20 64 |rnal (fo|rward) d|
|00001c50| 65 63 6c 61 72 61 74 69 | 6f 6e 73 0a 20 2a 2f 0a |eclarati|ons. */.|
|00001c60| 65 78 74 65 72 6e 20 73 | 74 72 75 63 74 20 69 6e |extern s|truct in|
|00001c70| 74 76 61 72 20 2a 66 69 | 6e 64 69 76 28 29 3b 09 |tvar *fi|ndiv();.|
|00001c80| 2f 2a 20 66 69 6e 64 20 | 65 6e 74 72 79 20 66 6f |/* find |entry fo|
|00001c90| 72 20 69 6e 74 65 72 6e | 61 6c 20 76 61 72 69 61 |r intern|al varia|
|00001ca0| 62 6c 65 20 2a 2f 0a 65 | 78 74 65 72 6e 20 69 6e |ble */.e|xtern in|
|00001cb0| 74 20 66 6d 67 65 74 73 | 28 29 3b 09 09 2f 2a 20 |t fmgets|();../* |
|00001cc0| 6c 69 6b 65 20 6d 67 65 | 74 73 20 62 75 74 20 66 |like mge|ts but f|
|00001cd0| 6f 6c 64 73 20 74 6f 20 | 6c 6f 77 65 72 20 63 61 |olds to |lower ca|
|00001ce0| 73 65 20 2a 2f 0a 65 78 | 74 65 72 6e 20 63 68 61 |se */.ex|tern cha|
|00001cf0| 72 20 2a 67 65 74 63 73 | 74 72 69 6e 67 28 29 3b |r *getcs|tring();|
|00001d00| 09 2f 2a 20 72 65 61 64 | 20 61 20 73 74 72 69 6e |./* read| a strin|
|00001d10| 67 20 69 6e 20 43 20 73 | 79 6e 74 61 78 20 2a 2f |g in C s|yntax */|
|00001d20| 0a 65 78 74 65 72 6e 20 | 69 6e 74 20 6d 67 65 74 |.extern |int mget|
|00001d30| 73 28 29 3b 09 09 2f 2a | 20 6c 69 6b 65 20 66 67 |s();../*| like fg|
|00001d40| 65 74 73 20 62 75 74 20 | 63 6c 6f 62 62 65 72 73 |ets but |clobbers|
|00001d50| 20 74 72 61 69 6c 69 6e | 67 20 6e 65 77 6c 69 6e | trailin|g newlin|
|00001d60| 65 20 2a 2f 0a 65 78 74 | 65 72 6e 20 73 74 72 75 |e */.ext|ern stru|
|00001d70| 63 74 20 70 61 73 73 77 | 64 20 2a 6d 67 70 77 6e |ct passw|d *mgpwn|
|00001d80| 61 6d 28 29 3b 2f 2a 20 | 70 61 73 73 77 6f 72 64 |am();/* |password|
|00001d90| 20 73 74 72 75 63 74 75 | 72 65 20 6c 6f 6f 6b 75 | structu|re looku|
|00001da0| 70 20 6f 6e 20 6e 61 6d | 65 20 2a 2f 0a 65 78 74 |p on nam|e */.ext|
|00001db0| 65 72 6e 20 73 74 72 75 | 63 74 20 70 61 73 73 77 |ern stru|ct passw|
|00001dc0| 64 20 2a 6d 67 70 77 75 | 69 64 28 29 3b 2f 2a 20 |d *mgpwu|id();/* |
|00001dd0| 70 61 73 73 77 6f 72 64 | 20 73 74 72 75 63 74 75 |password| structu|
|00001de0| 72 65 20 6c 6f 6f 6b 75 | 70 20 6f 6e 20 75 69 64 |re looku|p on uid|
|00001df0| 20 2a 2f 0a 65 78 74 65 | 72 6e 20 63 68 61 72 20 | */.exte|rn char |
|00001e00| 2a 6e 66 6d 74 28 29 3b | 09 09 2f 2a 20 66 6f 72 |*nfmt();|../* for|
|00001e10| 6d 61 74 73 20 61 20 6e | 75 6d 62 65 72 20 2a 2f |mats a n|umber */|
|00001e20| 0a 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 73 66 |.extern |char *sf|
|00001e30| 6d 74 28 29 3b 09 09 2f | 2a 20 66 6f 72 6d 61 74 |mt();../|* format|
|00001e40| 73 20 61 20 73 74 72 69 | 6e 67 20 2a 2f 0a 65 78 |s a stri|ng */.ex|
|00001e50| 74 65 72 6e 20 63 68 61 | 72 20 2a 73 74 72 73 61 |tern cha|r *strsa|
|00001e60| 76 65 28 29 3b 09 09 2f | 2a 20 63 6f 70 79 20 61 |ve();../|* copy a|
|00001e70| 20 73 74 72 69 6e 67 20 | 69 6e 74 6f 20 61 6c 6c | string |into all|
|00001e80| 6f 63 61 74 65 64 20 6d | 65 6d 6f 72 79 20 2a 2f |ocated m|emory */|
|00001e90| 0a 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 74 6f |.extern |char *to|
|00001ea0| 6e 75 6d 28 29 3b 09 09 | 2f 2a 20 63 6f 6e 76 65 |num();..|/* conve|
|00001eb0| 72 74 20 69 6e 74 65 72 | 20 74 6f 20 63 68 61 72 |rt inter| to char|
|00001ec0| 20 73 74 72 69 6e 67 20 | 2a 2f 0a 0a 2f 2a 0a 20 | string |*/../*. |
|00001ed0| 2a 20 6c 69 62 72 61 72 | 79 20 66 75 6e 63 74 69 |* librar|y functi|
|00001ee0| 6f 6e 73 0a 20 2a 2f 0a | 65 78 74 65 72 6e 20 63 |ons. */.|extern c|
|00001ef0| 68 61 72 20 2a 63 72 79 | 70 74 28 29 3b 09 09 2f |har *cry|pt();../|
|00001f00| 2a 20 65 6e 63 72 79 70 | 74 20 61 20 70 61 73 73 |* encryp|t a pass|
|00001f10| 77 6f 72 64 20 2a 2f 0a | 65 78 74 65 72 6e 20 69 |word */.|extern i|
|00001f20| 6e 74 20 66 63 6c 6f 73 | 65 28 29 3b 09 09 2f 2a |nt fclos|e();../*|
|00001f30| 20 63 6c 6f 73 65 73 20 | 61 20 66 69 6c 65 20 2a | closes |a file *|
|00001f40| 2f 0a 65 78 74 65 72 6e | 20 46 49 4c 45 20 2a 66 |/.extern| FILE *f|
|00001f50| 6f 70 65 6e 28 29 3b 09 | 09 2f 2a 20 6f 70 65 6e |open();.|./* open|
|00001f60| 73 20 61 20 66 69 6c 65 | 2c 20 72 65 74 75 72 6e |s a file|, return|
|00001f70| 73 20 70 6f 69 6e 74 65 | 72 20 2a 2f 0a 65 78 74 |s pointe|r */.ext|
|00001f80| 65 72 6e 20 69 6e 74 20 | 66 70 72 69 6e 74 66 28 |ern int |fprintf(|
|00001f90| 29 3b 09 09 2f 2a 20 66 | 6f 72 6d 61 74 74 65 64 |);../* f|ormatted|
|00001fa0| 20 70 72 69 6e 74 20 74 | 6f 20 66 69 6c 65 20 2a | print t|o file *|
|00001fb0| 2f 0a 65 78 74 65 72 6e | 20 73 74 72 75 63 74 20 |/.extern| struct |
|00001fc0| 67 72 6f 75 70 20 2a 67 | 65 74 67 72 67 69 64 28 |group *g|etgrgid(|
|00001fd0| 29 3b 2f 2a 20 67 65 74 | 20 67 72 6f 75 70 20 69 |);/* get| group i|
|00001fe0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 2a 2f 0a 65 78 |nformati|on */.ex|
|00001ff0| 74 65 72 6e 20 63 68 61 | 72 20 2a 67 65 74 70 61 |tern cha|r *getpa|
|00002000| 73 73 28 29 3b 09 09 2f | 2a 20 67 72 61 62 20 61 |ss();../|* grab a|
|00002010| 20 70 61 73 73 77 6f 72 | 64 20 2a 2f 0a 23 69 66 | passwor|d */.#if|
|00002020| 64 65 66 20 47 45 54 55 | 53 45 52 53 48 45 4c 4c |def GETU|SERSHELL|
|00002030| 0a 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 47 45 |.extern |char *GE|
|00002040| 54 55 53 45 52 53 48 45 | 4c 4c 28 29 3b 09 2f 2a |TUSERSHE|LL();./*|
|00002050| 20 72 65 74 75 72 6e 20 | 6c 65 67 61 6c 20 75 73 | return |legal us|
|00002060| 65 72 20 73 68 65 6c 6c | 73 20 2a 2f 0a 23 65 6e |er shell|s */.#en|
|00002070| 64 69 66 0a 65 78 74 65 | 72 6e 20 63 68 61 72 20 |dif.exte|rn char |
|00002080| 2a 69 6e 64 65 78 28 29 | 3b 09 09 2f 2a 20 66 69 |*index()|;../* fi|
|00002090| 6e 64 20 66 69 72 73 74 | 20 6f 63 63 75 72 72 61 |nd first| occurra|
|000020a0| 6e 63 65 20 6f 66 20 63 | 68 61 72 20 2a 2f 0a 65 |nce of c|har */.e|
|000020b0| 78 74 65 72 6e 20 63 68 | 61 72 20 2a 6d 61 6c 6c |xtern ch|ar *mall|
|000020c0| 6f 63 28 29 3b 09 09 2f | 2a 20 61 6c 6c 6f 63 61 |oc();../|* alloca|
|000020d0| 74 65 20 6d 65 6d 6f 72 | 79 20 2a 2f 0a 65 78 74 |te memor|y */.ext|
|000020e0| 65 72 6e 20 69 6e 74 20 | 70 63 6c 6f 73 65 28 29 |ern int |pclose()|
|000020f0| 3b 09 09 2f 2a 20 63 6c | 6f 73 65 73 20 61 20 70 |;../* cl|oses a p|
|00002100| 69 70 65 20 2a 2f 0a 65 | 78 74 65 72 6e 20 46 49 |ipe */.e|xtern FI|
|00002110| 4c 45 20 2a 70 6f 70 65 | 6e 28 29 3b 09 09 2f 2a |LE *pope|n();../*|
|00002120| 20 6f 70 65 6e 73 20 61 | 20 70 69 70 65 2c 20 72 | opens a| pipe, r|
|00002130| 65 74 75 72 6e 73 20 70 | 6f 69 6e 74 65 72 20 2a |eturns p|ointer *|
|00002140| 2f 0a 65 78 74 65 72 6e | 20 69 6e 74 20 70 72 69 |/.extern| int pri|
|00002150| 6e 74 66 28 29 3b 09 09 | 2f 2a 20 66 6f 72 6d 61 |ntf();..|/* forma|
|00002160| 74 74 65 64 20 70 72 69 | 6e 74 20 74 6f 20 73 74 |tted pri|nt to st|
|00002170| 61 6e 64 61 72 64 20 6f | 75 74 70 75 74 20 2a 2f |andard o|utput */|
|00002180| 0a 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 73 70 |.extern |char *sp|
|00002190| 72 69 6e 74 66 28 29 3b | 09 09 2f 2a 20 66 6f 72 |rintf();|../* for|
|000021a0| 6d 61 74 74 65 64 20 70 | 72 69 6e 74 20 74 6f 20 |matted p|rint to |
|000021b0| 6d 65 6d 6f 72 79 20 2a | 2f 0a 65 78 74 65 72 6e |memory *|/.extern|
|000021c0| 20 63 68 61 72 20 2a 73 | 74 72 63 61 74 28 29 3b | char *s|trcat();|
|000021d0| 09 09 2f 2a 20 61 70 70 | 65 6e 64 20 74 6f 20 61 |../* app|end to a|
|000021e0| 20 73 74 72 69 6e 67 20 | 2a 2f 0a 65 78 74 65 72 | string |*/.exter|
|000021f0| 6e 20 69 6e 74 20 73 74 | 72 63 6d 70 28 29 3b 09 |n int st|rcmp();.|
|00002200| 09 2f 2a 20 73 74 72 69 | 6e 67 20 63 6f 6d 70 61 |./* stri|ng compa|
|00002210| 72 69 73 6f 6e 20 66 75 | 6e 63 74 69 6f 6e 20 2a |rison fu|nction *|
|00002220| 2f 0a 65 78 74 65 72 6e | 20 63 68 61 72 20 2a 73 |/.extern| char *s|
|00002230| 74 72 63 70 79 28 29 3b | 09 09 2f 2a 20 63 6f 70 |trcpy();|../* cop|
|00002240| 79 20 61 20 73 74 72 69 | 6e 67 20 2a 2f 0a 65 78 |y a stri|ng */.ex|
|00002250| 74 65 72 6e 20 63 68 61 | 72 20 2a 73 74 72 6e 63 |tern cha|r *strnc|
|00002260| 70 79 28 29 3b 09 09 2f | 2a 20 63 6f 70 79 20 70 |py();../|* copy p|
|00002270| 61 72 74 20 6f 66 20 61 | 20 73 74 72 69 6e 67 20 |art of a| string |
|00002280| 2a 2f 0a 65 78 74 65 72 | 6e 20 74 69 6d 65 5f 74 |*/.exter|n time_t|
|00002290| 20 74 69 6d 65 28 29 3b | 09 09 2f 2a 20 72 65 74 | time();|../* ret|
|000022a0| 75 72 6e 20 69 6e 74 65 | 72 6e 61 6c 20 74 69 6d |urn inte|rnal tim|
|000022b0| 65 20 2a 2f 0a 0a 2f 2a | 0a 20 2a 20 6c 69 6e 74 |e */../*|. * lint|
|000022c0| 20 73 74 75 66 66 0a 20 | 2a 2f 0a 23 64 65 66 69 | stuff. |*/.#defi|
|000022d0| 6e 65 20 46 50 52 49 4e | 54 46 09 28 76 6f 69 64 |ne FPRIN|TF.(void|
|000022e0| 29 20 66 70 72 69 6e 74 | 66 09 2f 2a 20 72 65 74 |) fprint|f./* ret|
|000022f0| 75 72 6e 20 76 61 6c 75 | 65 20 6f 66 20 66 70 72 |urn valu|e of fpr|
|00002300| 69 6e 74 66 20 4e 45 56 | 45 52 20 75 73 65 64 20 |intf NEV|ER used |
|00002310| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 50 52 49 4e 54 |*/.#defi|ne PRINT|
|00002320| 46 09 28 76 6f 69 64 29 | 20 70 72 69 6e 74 66 09 |F.(void)| printf.|
|00002330| 2f 2a 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 |/* retur|n value |
|00002340| 6f 66 20 70 72 69 6e 74 | 66 20 4e 45 56 45 52 20 |of print|f NEVER |
|00002350| 75 73 65 64 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |used */.|#define |
|00002360| 53 50 52 49 4e 54 46 09 | 28 76 6f 69 64 29 20 73 |SPRINTF.|(void) s|
|00002370| 70 72 69 6e 74 66 09 2f | 2a 20 72 65 74 75 72 6e |printf./|* return|
|00002380| 20 76 61 6c 75 65 20 6f | 66 20 73 70 72 69 6e 74 | value o|f sprint|
|00002390| 66 20 4e 45 56 45 52 20 | 75 73 65 64 20 2a 2f 0a |f NEVER |used */.|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 70 61 73 73 77 64 2b 2f | 52 45 41 44 4d 45 00 00 |passwd+/|README..|
|00002410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 31 30 30 36 | 34 34 00 00 30 30 30 31 |....1006|44..0001|
|00002470| 31 35 00 00 30 30 30 30 | 32 34 00 00 30 30 30 30 |15..0000|24..0000|
|00002480| 30 30 32 35 34 32 37 00 | 30 35 31 35 37 37 33 36 |0025427.|05157736|
|00002490| 31 35 35 00 30 30 37 34 | 37 30 00 20 30 00 00 00 |155.0074|70. 0...|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 20 20 20 20 20 30 00 | 00 00 00 00 00 00 00 00 |. 0.|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00002560| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 43 4f 4e 46 49 47 55 52 | 41 54 49 4f 4e 20 46 49 |CONFIGUR|ATION FI|
|00002610| 4c 45 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |LE.-----|--------|
|00002620| 20 2d 2d 2d 2d 0a 0a 54 | 6f 20 62 65 20 61 63 63 | ----..T|o be acc|
|00002630| 65 70 74 65 64 20 61 20 | 70 61 73 73 77 6f 72 64 |epted a |password|
|00002640| 20 6d 75 73 74 20 75 6e | 64 65 72 67 6f 20 61 20 | must un|dergo a |
|00002650| 73 65 72 69 65 73 20 6f | 66 20 74 65 73 74 73 2e |series o|f tests.|
|00002660| 0a 54 68 65 20 74 65 73 | 74 73 20 61 72 65 3a 0a |.The tes|ts are:.|
|00002670| 0a 09 6e 75 6d 62 65 72 | 3d 3d 6e 75 6d 62 65 72 |..number|==number|
|00002680| 09 70 61 73 73 20 69 66 | 20 74 68 65 20 74 77 6f |.pass if| the two|
|00002690| 20 6e 75 6d 62 65 72 73 | 20 61 72 65 20 65 71 75 | numbers| are equ|
|000026a0| 61 6c 0a 09 73 74 72 69 | 6e 67 3d 3d 73 74 72 69 |al..stri|ng==stri|
|000026b0| 6e 67 09 70 61 73 73 20 | 69 66 20 74 68 65 20 74 |ng.pass |if the t|
|000026c0| 77 6f 20 73 74 72 69 6e | 67 73 20 61 72 65 20 69 |wo strin|gs are i|
|000026d0| 64 65 6e 74 69 63 61 6c | 0a 09 73 74 72 69 6e 67 |dentical|..string|
|000026e0| 3d 7e 70 61 74 74 65 72 | 6e 09 70 61 73 73 20 69 |=~patter|n.pass i|
|000026f0| 66 20 74 68 65 20 73 74 | 72 69 6e 67 20 6d 61 74 |f the st|ring mat|
|00002700| 63 68 65 73 20 74 68 65 | 20 70 61 74 74 65 72 6e |ches the| pattern|
|00002710| 0a 09 5b 66 69 6c 65 6e | 61 6d 65 5d 3d 3d 73 74 |..[filen|ame]==st|
|00002720| 72 69 6e 67 09 70 61 73 | 73 20 69 66 20 61 20 6c |ring.pas|s if a l|
|00002730| 69 6e 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |ine in t|he file |
|00002740| 61 6e 64 20 74 68 65 20 | 73 74 72 69 6e 67 0a 09 |and the |string..|
|00002750| 09 09 09 61 72 65 20 69 | 64 65 6e 74 69 63 61 6c |...are i|dentical|
|00002760| 20 28 6e 65 77 6c 69 6e | 65 73 20 61 72 65 20 64 | (newlin|es are d|
|00002770| 69 73 63 61 72 64 65 64 | 29 0a 09 5b 66 69 6c 65 |iscarded|)..[file|
|00002780| 6e 61 6d 65 5d 3d 7e 70 | 61 74 74 65 72 6e 09 70 |name]=~p|attern.p|
|00002790| 61 73 73 20 69 66 20 61 | 20 6c 69 6e 65 20 69 6e |ass if a| line in|
|000027a0| 20 74 68 65 20 66 69 6c | 65 20 6d 61 74 63 68 65 | the fil|e matche|
|000027b0| 73 20 74 68 65 0a 09 09 | 09 09 70 61 74 74 65 72 |s the...|..patter|
|000027c0| 6e 20 28 6e 65 77 6c 69 | 6e 65 73 20 61 72 65 20 |n (newli|nes are |
|000027d0| 64 69 73 63 61 72 64 65 | 64 29 0a 09 7b 70 72 6f |discarde|d)..{pro|
|000027e0| 67 72 61 6d 7d 3d 3d 73 | 74 72 69 6e 67 09 70 61 |gram}==s|tring.pa|
|000027f0| 73 73 20 69 66 20 61 20 | 6c 69 6e 65 20 69 6e 20 |ss if a |line in |
|00002800| 74 68 65 20 6f 75 74 70 | 75 74 20 6f 66 20 74 68 |the outp|ut of th|
|00002810| 65 20 70 72 6f 67 72 61 | 6d 0a 09 09 09 09 61 6e |e progra|m.....an|
|00002820| 64 20 74 68 65 20 73 74 | 72 69 6e 67 20 61 72 65 |d the st|ring are|
|00002830| 20 69 64 65 6e 74 69 63 | 61 6c 20 28 6e 65 77 6c | identic|al (newl|
|00002840| 69 6e 65 73 20 61 72 65 | 0a 09 09 09 09 64 69 73 |ines are|.....dis|
|00002850| 63 61 72 64 65 64 29 0a | 09 7b 70 72 6f 67 72 61 |carded).|.{progra|
|00002860| 6d 7d 3d 7e 70 61 74 74 | 65 72 6e 09 70 61 73 73 |m}=~patt|ern.pass|
|00002870| 20 69 66 20 61 20 6c 69 | 6e 65 20 69 6e 20 74 68 | if a li|ne in th|
|00002880| 65 20 6f 75 74 70 75 74 | 20 6f 66 20 74 68 65 20 |e output| of the |
|00002890| 70 72 6f 67 72 61 6d 0a | 09 09 09 09 6d 61 74 63 |program.|....matc|
|000028a0| 68 65 73 20 74 68 65 20 | 70 61 74 74 65 72 6e 20 |hes the |pattern |
|000028b0| 28 6e 65 77 6c 69 6e 65 | 73 20 61 72 65 20 64 69 |(newline|s are di|
|000028c0| 73 63 61 72 64 65 64 29 | 0a 09 28 74 65 73 74 31 |scarded)|..(test1|
|000028d0| 29 09 09 70 61 73 73 20 | 69 66 20 74 65 73 74 31 |)..pass |if test1|
|000028e0| 20 70 61 73 73 65 73 20 | 28 67 72 6f 75 70 69 6e | passes |(groupin|
|000028f0| 67 29 0a 09 7e 74 65 73 | 74 31 09 09 70 61 73 73 |g)..~tes|t1..pass|
|00002900| 20 69 66 20 74 65 73 74 | 31 20 66 61 69 6c 73 0a | if test|1 fails.|
|00002910| 09 21 74 65 73 74 31 09 | 09 70 61 73 73 20 69 66 |.!test1.|.pass if|
|00002920| 20 74 65 73 74 31 20 66 | 61 69 6c 73 0a 09 74 65 | test1 f|ails..te|
|00002930| 73 74 31 26 74 65 73 74 | 32 09 70 61 73 73 20 69 |st1&test|2.pass i|
|00002940| 66 20 74 65 73 74 31 20 | 61 6e 64 20 74 65 73 74 |f test1 |and test|
|00002950| 32 20 61 72 65 20 62 6f | 74 68 20 73 61 74 69 73 |2 are bo|th satis|
|00002960| 66 69 65 64 0a 09 74 65 | 73 74 31 7c 74 65 73 74 |fied..te|st1|test|
|00002970| 32 09 70 61 73 73 20 69 | 66 20 65 69 74 68 65 72 |2.pass i|f either|
|00002980| 20 74 65 73 74 31 20 6f | 72 20 74 65 73 74 32 20 | test1 o|r test2 |
|00002990| 61 72 65 20 73 61 74 69 | 73 66 69 65 64 0a 0a 49 |are sati|sfied..I|
|000029a0| 66 20 61 20 70 61 73 73 | 77 6f 72 64 20 70 61 73 |f a pass|word pas|
|000029b0| 73 65 73 20 61 6e 79 20 | 6c 69 73 74 65 64 20 74 |ses any |listed t|
|000029c0| 65 73 74 2c 20 69 74 20 | 69 73 20 72 65 6a 65 63 |est, it |is rejec|
|000029d0| 74 65 64 2e 20 20 4e 6f | 74 65 20 61 6e 79 20 6f |ted. No|te any o|
|000029e0| 66 20 21 3d 2c 20 3c 3e | 2c 0a 3c 2c 20 3e 2c 20 |f !=, <>|,.<, >, |
|000029f0| 3e 3d 2c 20 3c 3d 2c 20 | 3d 3d 20 6d 61 79 20 62 |>=, <=, |== may b|
|00002a00| 65 20 73 75 62 73 74 69 | 74 75 74 65 64 20 66 6f |e substi|tuted fo|
|00002a10| 72 20 3d 20 61 62 6f 76 | 65 20 28 77 69 74 68 20 |r = abov|e (with |
|00002a20| 74 68 65 20 6f 62 76 69 | 6f 75 73 20 6d 65 61 6e |the obvi|ous mean|
|00002a30| 69 6e 67 29 2c 0a 61 6e | 64 20 21 7e 20 6d 61 79 |ing),.an|d !~ may|
|00002a40| 20 62 65 20 73 75 62 73 | 74 69 74 75 74 65 64 20 | be subs|tituted |
|00002a50| 66 6f 72 20 3d 7e 20 74 | 6f 20 69 6e 76 65 72 74 |for =~ t|o invert|
|00002a60| 20 74 68 65 20 73 65 6e | 73 65 20 6f 66 20 74 68 | the sen|se of th|
|00002a70| 65 20 6d 61 74 63 68 2e | 20 20 4f 6e 6c 79 0a 3d |e match.| Only.=|
|00002a80| 3d 20 61 6e 64 20 21 3d | 20 6d 61 79 20 62 65 20 |= and !=| may be |
|00002a90| 75 73 65 64 20 74 6f 20 | 63 6f 6d 70 61 72 65 20 |used to |compare |
|00002aa0| 73 74 72 69 6e 67 73 2e | 20 20 22 6e 75 6d 62 65 |strings.| "numbe|
|00002ab0| 72 22 20 6d 61 79 20 62 | 65 20 61 6e 20 65 78 70 |r" may b|e an exp|
|00002ac0| 72 65 73 73 69 6f 6e 0a | 75 73 69 6e 67 20 61 6e |ression.|using an|
|00002ad0| 79 20 6f 66 20 2b 2c 20 | 2d 2c 20 2a 2c 20 2f 2c |y of +, |-, *, /,|
|00002ae0| 20 25 2c 20 61 6e 64 20 | 28 20 61 6e 64 20 29 20 | %, and |( and ) |
|00002af0| 66 6f 72 20 67 72 6f 75 | 70 69 6e 67 20 28 70 72 |for grou|ping (pr|
|00002b00| 65 63 65 64 65 6e 63 65 | 20 69 73 20 74 68 65 0a |ecedence| is the.|
|00002b10| 75 73 75 61 6c 2e 29 20 | 20 55 73 65 20 5c 20 74 |usual.) | Use \ t|
|00002b20| 6f 20 65 73 63 61 70 65 | 20 61 20 73 74 72 69 6e |o escape| a strin|
|00002b30| 67 20 64 65 6c 69 6d 69 | 74 65 72 2e 0a 0a 43 65 |g delimi|ter...Ce|
|00002b40| 72 74 61 69 6e 20 76 61 | 6c 75 65 73 20 6d 61 79 |rtain va|lues may|
|00002b50| 20 62 65 20 69 6e 74 65 | 72 70 6f 6c 61 74 65 64 | be inte|rpolated|
|00002b60| 20 69 6e 74 6f 20 74 65 | 73 74 73 20 62 79 20 75 | into te|sts by u|
|00002b70| 73 69 6e 67 20 61 20 6e | 6f 74 61 74 69 6f 6e 20 |sing a n|otation |
|00002b80| 6c 69 6b 65 0a 70 72 69 | 6e 74 66 27 73 2e 20 20 |like.pri|ntf's. |
|00002b90| 54 68 65 20 66 6f 72 6d | 20 69 73 3a 0a 09 25 20 |The form| is:..% |
|00002ba0| 5b 20 2b 2d 20 5d 20 5b | 20 3c 6e 31 3e 20 5d 20 |[ +- ] [| <n1> ] |
|00002bb0| 5b 20 2e 20 3c 6e 32 3e | 20 5d 20 5b 20 5e 2a 7c |[ . <n2>| ] [ ^*||
|00002bc0| 23 20 5d 20 3c 65 73 63 | 61 70 65 3e 0a 54 68 65 |# ] <esc|ape>.The|
|00002bd0| 20 3c 65 73 63 61 70 65 | 73 3e 20 61 72 65 20 64 | <escape|s> are d|
|00002be0| 69 76 69 64 65 64 20 69 | 6e 74 6f 20 74 77 6f 20 |ivided i|nto two |
|00002bf0| 63 6c 61 73 73 65 73 3a | 20 6e 75 6d 62 65 72 73 |classes:| numbers|
|00002c00| 20 61 6e 64 20 73 74 72 | 69 6e 67 73 2e 0a 54 68 | and str|ings..Th|
|00002c10| 65 20 65 73 63 61 70 65 | 73 20 61 72 65 3a 0a 65 |e escape|s are:.e|
|00002c20| 73 63 61 70 65 09 20 77 | 68 61 74 09 09 09 09 6d |scape. w|hat....m|
|00002c30| 65 61 6e 69 6e 67 0a 20 | 20 41 2d 5a 09 73 74 72 |eaning. | A-Z.str|
|00002c40| 69 6e 67 09 09 75 73 65 | 72 20 64 65 66 69 6e 65 |ing..use|r define|
|00002c50| 64 20 73 74 72 69 6e 67 | 73 20 28 23 41 20 74 68 |d string|s (#A th|
|00002c60| 72 6f 75 67 68 20 23 5a | 20 69 6e 63 6c 75 73 69 |rough #Z| inclusi|
|00002c70| 76 65 29 0a 20 20 20 61 | 09 6e 75 6d 62 65 72 09 |ve). a|.number.|
|00002c80| 09 6e 75 6d 62 65 72 20 | 6f 66 20 61 6c 70 68 61 |.number |of alpha|
|00002c90| 6e 75 6d 65 72 69 63 20 | 63 68 61 72 61 63 74 65 |numeric |characte|
|00002ca0| 72 73 20 69 6e 20 70 61 | 73 73 77 6f 72 64 0a 20 |rs in pa|ssword. |
|00002cb0| 20 20 62 09 6e 75 6d 62 | 65 72 09 09 6e 75 6d 62 | b.numb|er..numb|
|00002cc0| 65 72 20 6f 66 20 61 6c | 70 68 61 62 65 74 69 63 |er of al|phabetic|
|00002cd0| 20 63 68 61 72 61 63 74 | 65 72 73 20 69 6e 20 70 | charact|ers in p|
|00002ce0| 61 73 73 77 6f 72 64 0a | 20 20 20 63 09 6e 75 6d |assword.| c.num|
|00002cf0| 62 65 72 09 09 6e 75 6d | 62 65 72 20 6f 66 20 63 |ber..num|ber of c|
|00002d00| 61 70 69 74 61 6c 20 6c | 65 74 74 65 72 73 20 69 |apital l|etters i|
|00002d10| 6e 20 70 61 73 73 77 6f | 72 64 0a 20 20 20 64 09 |n passwo|rd. d.|
|00002d20| 73 74 72 69 6e 67 09 09 | 64 6f 6d 61 69 6e 20 6e |string..|domain n|
|00002d30| 61 6d 65 20 6f 66 20 6d | 61 63 68 69 6e 65 0a 20 |ame of m|achine. |
|00002d40| 20 20 66 09 73 74 72 69 | 6e 67 09 09 66 69 72 73 | f.stri|ng..firs|
|00002d50| 74 20 6e 61 6d 65 20 6f | 66 20 75 73 65 72 0a 20 |t name o|f user. |
|00002d60| 20 20 69 09 73 74 72 69 | 6e 67 09 09 69 6e 69 74 | i.stri|ng..init|
|00002d70| 69 61 6c 73 20 6f 66 20 | 75 73 65 72 0a 20 20 20 |ials of |user. |
|00002d80| 6c 09 6e 75 6d 62 65 72 | 09 09 6e 75 6d 62 65 72 |l.number|..number|
|00002d90| 20 6f 66 20 6c 6f 77 65 | 72 20 63 61 73 65 20 6c | of lowe|r case l|
|00002da0| 65 74 74 65 72 73 20 69 | 6e 20 70 61 73 73 77 6f |etters i|n passwo|
|00002db0| 72 64 0a 20 20 20 6d 09 | 73 74 72 69 6e 67 09 09 |rd. m.|string..|
|00002dc0| 6d 69 64 64 6c 65 20 6e | 61 6d 65 20 6f 66 20 75 |middle n|ame of u|
|00002dd0| 73 65 72 0a 20 20 20 6e | 09 73 74 72 69 6e 67 09 |ser. n|.string.|
|00002de0| 09 66 75 6c 6c 20 6e 61 | 6d 65 20 6f 66 20 75 73 |.full na|me of us|
|00002df0| 65 72 0a 20 20 20 6f 09 | 73 74 72 69 6e 67 09 09 |er. o.|string..|
|00002e00| 6f 66 66 69 63 65 20 6f | 66 20 75 73 65 72 0a 20 |office o|f user. |
|00002e10| 20 20 70 09 73 74 72 69 | 6e 67 09 09 70 72 6f 70 | p.stri|ng..prop|
|00002e20| 6f 73 65 64 20 70 61 73 | 73 77 6f 72 64 0a 20 20 |osed pas|sword. |
|00002e30| 20 71 09 73 74 72 69 6e | 67 09 09 63 75 72 72 65 | q.strin|g..curre|
|00002e40| 6e 74 20 70 61 73 77 6f | 72 64 20 28 61 73 20 74 |nt paswo|rd (as t|
|00002e50| 79 70 65 64 29 0a 20 20 | 20 73 09 73 74 72 69 6e |yped). | s.strin|
|00002e60| 67 09 09 73 75 72 6e 61 | 6d 65 20 6f 66 20 75 73 |g..surna|me of us|
|00002e70| 65 72 0a 20 20 20 74 09 | 73 74 72 69 6e 67 09 09 |er. t.|string..|
|00002e80| 74 65 6c 65 70 68 6f 6e | 65 20 6e 75 6d 62 65 72 |telephon|e number|
|00002e90| 20 6f 66 20 75 73 65 72 | 0a 20 20 20 75 09 73 74 | of user|. u.st|
|00002ea0| 72 69 6e 67 09 09 6c 6f | 67 69 6e 20 6e 61 6d 65 |ring..lo|gin name|
|00002eb0| 20 6f 66 20 75 73 65 72 | 0a 20 20 20 76 09 6e 75 | of user|. v.nu|
|00002ec0| 6d 62 65 72 09 09 31 20 | 69 66 20 70 61 73 73 77 |mber..1 |if passw|
|00002ed0| 6f 72 64 20 68 61 73 20 | 6d 69 78 65 64 20 63 61 |ord has |mixed ca|
|00002ee0| 73 65 2c 20 30 20 6f 74 | 68 65 72 77 69 73 65 0a |se, 0 ot|herwise.|
|00002ef0| 20 20 20 77 09 6e 75 6d | 62 65 72 09 09 6e 75 6d | w.num|ber..num|
|00002f00| 62 65 72 20 6f 66 20 28 | 64 65 63 69 6d 61 6c 29 |ber of (|decimal)|
|00002f10| 20 64 69 67 69 74 73 20 | 69 6e 20 70 61 73 73 77 | digits |in passw|
|00002f20| 6f 72 64 0a 54 68 65 20 | 65 73 63 61 70 65 20 73 |ord.The |escape s|
|00002f30| 65 71 75 65 6e 63 65 20 | 69 73 20 69 6e 74 65 72 |equence |is inter|
|00002f40| 70 72 65 74 65 64 20 73 | 6c 69 67 68 74 6c 79 20 |preted s|lightly |
|00002f50| 64 69 66 66 65 72 65 6e | 74 6c 79 20 66 6f 72 20 |differen|tly for |
|00002f60| 6e 75 6d 62 65 72 73 20 | 61 6e 64 0a 73 74 72 69 |numbers |and.stri|
|00002f70| 6e 67 73 2e 20 46 6f 72 | 20 6e 75 6d 62 65 72 73 |ngs. For| numbers|
|00002f80| 3a 0a 09 25 20 5b 20 2b | 2d 20 5d 20 5b 20 3c 6e |:..% [ +|- ] [ <n|
|00002f90| 31 3e 20 5d 20 5b 20 2e | 20 3c 6e 32 3e 20 5d 20 |1> ] [ .| <n2> ] |
|00002fa0| 5b 20 5e 2a 7c 23 20 5d | 20 3c 65 73 63 61 70 65 |[ ^*|# ]| <escape|
|00002fb0| 3e 0a 20 20 20 20 20 20 | 20 20 5e 20 20 20 5e 20 |>. | ^ ^ |
|00002fc0| 20 20 20 20 20 20 5e 20 | 20 20 20 20 20 20 20 20 | ^ | |
|00002fd0| 5e 09 20 20 20 20 20 20 | 20 20 5e 20 20 20 20 20 |^. | ^ |
|00002fe0| 20 20 20 5e 2d 2d 2d 20 | 65 73 63 61 70 65 20 63 | ^--- |escape c|
|00002ff0| 68 61 72 61 63 74 65 72 | 0a 20 20 20 20 20 20 20 |haracter|. |
|00003000| 20 7c 20 20 20 7c 20 20 | 20 20 20 20 20 7c 20 20 | | | | | |
|00003010| 20 20 20 20 20 20 20 7c | 20 20 20 20 20 20 20 20 | || |
|00003020| 20 2b 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 20 69 | +------|------ i|
|00003030| 67 6e 6f 72 65 64 0a 09 | 7c 20 20 20 7c 20 20 20 |gnored..|| | |
|00003040| 20 20 20 20 7c 20 20 20 | 20 20 20 20 20 20 2b 2d | | | +-|
|00003050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003060| 2d 2d 2d 2d 2d 20 69 67 | 6e 6f 72 65 64 0a 09 7c |----- ig|nored..||
|00003070| 20 20 20 7c 20 20 20 20 | 20 20 20 2b 2d 2d 2d 2d | | | +----|
|00003080| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 20 69 67 6e |--------|---- ign|
|000030a0| 6f 72 65 64 0a 09 7c 20 | 20 20 2b 2d 2d 2d 2d 2d |ored..| | +-----|
|000030b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000030c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000030d0| 2d 2d 2d 20 63 6f 6d 70 | 6c 65 6d 65 6e 74 0a 09 |--- comp|lement..|
|000030e0| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |+-------|--------|
|000030f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 20 62 65 |--------|----- be|
|00003110| 67 69 6e 20 65 73 63 61 | 70 65 20 73 65 71 75 65 |gin esca|pe seque|
|00003120| 6e 63 65 0a 48 65 72 65 | 2c 20 77 69 74 68 20 61 |nce.Here|, with a|
|00003130| 6c 6c 20 6e 75 6d 62 65 | 72 73 20 65 78 63 65 70 |ll numbe|rs excep|
|00003140| 74 20 22 25 76 22 2c 20 | 63 6f 6d 70 6c 65 6d 65 |t "%v", |compleme|
|00003150| 6e 74 61 74 69 6f 6e 20 | 6d 65 61 6e 73 20 74 68 |ntation |means th|
|00003160| 65 20 72 65 6c 65 76 61 | 6e 74 20 6e 75 6d 62 65 |e releva|nt numbe|
|00003170| 72 0a 69 73 20 73 75 62 | 74 72 61 63 74 65 64 20 |r.is sub|tracted |
|00003180| 66 72 6f 6d 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |from the| length |
|00003190| 6f 66 20 74 68 65 20 70 | 61 73 73 77 6f 72 64 20 |of the p|assword |
|000031a0| 28 77 68 65 72 65 20 6c | 65 6e 67 74 68 20 69 73 |(where l|ength is|
|000031b0| 20 74 68 65 20 6c 65 73 | 73 65 72 20 6f 66 0a 74 | the les|ser of.t|
|000031c0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 68 61 |he numbe|r of cha|
|000031d0| 72 61 63 74 65 72 73 20 | 69 6e 20 74 68 65 20 70 |racters |in the p|
|000031e0| 61 73 73 77 6f 72 64 20 | 61 6e 64 20 74 68 65 20 |assword |and the |
|000031f0| 6e 75 6d 62 65 72 20 6f | 66 20 73 69 67 6e 69 66 |number o|f signif|
|00003200| 69 63 61 6e 74 20 0a 63 | 68 61 72 61 63 74 65 72 |icant .c|haracter|
|00003210| 73 29 2e 20 20 57 69 74 | 68 20 22 25 76 22 2c 20 |s). Wit|h "%v", |
|00003220| 63 6f 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 |compleme|ntation |
|00003230| 6d 65 61 6e 73 20 62 6f | 6f 6c 65 61 6e 20 6e 65 |means bo|olean ne|
|00003240| 67 61 74 69 6f 6e 3b 20 | 69 66 20 22 25 76 22 20 |gation; |if "%v" |
|00003250| 69 73 0a 31 2c 20 22 25 | 2d 76 22 20 69 73 20 30 |is.1, "%|-v" is 0|
|00003260| 2c 20 61 6e 64 20 76 69 | 63 65 20 76 65 72 73 61 |, and vi|ce versa|
|00003270| 2e 20 20 22 2b 22 20 69 | 73 20 69 67 6e 6f 72 65 |. "+" i|s ignore|
|00003280| 64 3b 20 22 2d 22 20 64 | 6f 65 73 20 74 68 65 20 |d; "-" d|oes the |
|00003290| 63 6f 6d 70 6c 65 6d 65 | 6e 74 69 6e 67 2e 0a 46 |compleme|nting..F|
|000032a0| 6f 72 20 73 74 72 69 6e | 67 73 3a 0a 09 25 20 5b |or strin|gs:..% [|
|000032b0| 20 2b 2d 20 5d 20 5b 20 | 3c 6e 31 3e 20 5d 20 5b | +- ] [ |<n1> ] [|
|000032c0| 20 2e 20 3c 6e 32 3e 20 | 5d 20 5b 20 24 20 5d 20 | . <n2> |] [ $ ] |
|000032d0| 5b 20 5e 2a 7c 23 20 5d | 20 3c 65 73 63 61 70 65 |[ ^*|# ]| <escape|
|000032e0| 3e 0a 20 20 20 20 20 20 | 20 20 5e 20 20 20 5e 20 |>. | ^ ^ |
|000032f0| 20 20 20 20 20 20 5e 20 | 20 20 20 20 20 20 20 20 | ^ | |
|00003300| 5e 09 20 20 20 20 20 20 | 20 20 5e 20 20 20 20 20 |^. | ^ |
|00003310| 20 20 20 5e 2d 2d 2d 20 | 65 73 63 61 70 65 20 63 | ^--- |escape c|
|00003320| 68 61 72 61 63 74 65 72 | 0a 20 20 20 20 20 20 20 |haracter|. |
|00003330| 20 7c 20 20 20 7c 20 20 | 20 20 20 20 20 7c 20 20 | | | | | |
|00003340| 20 20 20 20 20 20 20 7c | 20 20 20 20 20 20 20 20 | || |
|00003350| 20 2b 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 20 66 | +------|------ f|
|00003360| 6f 72 6d 61 74 20 63 6f | 6e 74 72 6f 6c 0a 09 7c |ormat co|ntrol..||
|00003370| 20 20 20 7c 20 20 20 20 | 20 20 20 7c 20 20 20 20 | | | | |
|00003380| 20 20 20 20 20 2b 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +--|--------|
|00003390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 20 65 6e 64 |--------|---- end|
|000033a0| 69 6e 67 20 6e 75 6d 62 | 65 72 0a 09 7c 20 20 20 |ing numb|er..| |
|000033b0| 7c 20 20 20 20 20 20 20 | 2b 2d 2d 2d 2d 2d 2d 2d || |+-------|
|000033c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000033d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 62 65 67 69 6e 6e |--------|- beginn|
|000033e0| 69 6e 67 20 6e 75 6d 62 | 65 72 0a 09 7c 20 20 20 |ing numb|er..| |
|000033f0| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |+-------|--------|
|00003400| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 72 65 76 65 72 73 |--------|- revers|
|00003420| 65 0a 09 2b 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |e..+----|--------|
|00003430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003450| 20 62 65 67 69 6e 20 65 | 73 63 61 70 65 20 73 65 | begin e|scape se|
|00003460| 71 75 65 6e 63 65 0a 48 | 65 72 65 2c 20 66 6f 72 |quence.H|ere, for|
|00003470| 20 61 6c 6c 20 73 74 72 | 69 6e 67 73 2c 0a 72 65 | all str|ings,.re|
|00003480| 76 65 72 73 65 09 09 6d | 65 61 6e 73 20 74 6f 20 |verse..m|eans to |
|00003490| 72 65 76 65 72 73 65 20 | 74 68 65 20 73 74 72 69 |reverse |the stri|
|000034a0| 6e 67 0a 62 65 67 69 6e | 6e 69 6e 67 20 6e 75 6d |ng.begin|ning num|
|000034b0| 62 65 72 0a 09 09 69 73 | 20 74 68 65 20 6e 75 6d |ber...is| the num|
|000034c0| 62 65 72 20 6f 66 20 74 | 68 65 20 70 6f 73 69 74 |ber of t|he posit|
|000034d0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 66 69 72 73 74 |ion of t|he first|
|000034e0| 20 63 68 61 72 61 63 74 | 65 72 0a 09 09 74 6f 20 | charact|er...to |
|000034f0| 62 65 20 69 6e 74 65 72 | 70 6f 6c 61 74 65 64 3b |be inter|polated;|
|00003500| 20 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 22 | for ex|ample, "|
|00003510| 25 31 2e 33 68 22 20 77 | 6f 75 6c 64 20 69 6e 74 |%1.3h" w|ould int|
|00003520| 65 72 70 6f 6c 61 74 65 | 0a 09 09 74 68 65 20 66 |erpolate|...the f|
|00003530| 69 72 73 74 2c 20 73 65 | 63 6f 6e 64 2c 20 61 6e |irst, se|cond, an|
|00003540| 64 20 74 68 69 72 64 20 | 63 68 61 72 61 63 74 65 |d third |characte|
|00003550| 72 73 20 6f 66 20 74 68 | 65 20 68 6f 73 74 20 6e |rs of th|e host n|
|00003560| 61 6d 65 0a 09 09 28 74 | 68 65 20 66 69 72 73 74 |ame...(t|he first|
|00003570| 20 63 68 61 72 61 63 74 | 65 72 20 70 6f 73 69 74 | charact|er posit|
|00003580| 69 6f 6e 20 69 73 20 22 | 31 22 2e 29 20 20 49 66 |ion is "|1".) If|
|00003590| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 66 6f 6c | there i|s no fol|
|000035a0| 6c 6f 77 69 6e 67 0a 09 | 09 70 65 72 69 6f 64 20 |lowing..|.period |
|000035b0| 28 69 65 2c 20 22 25 31 | 68 22 29 2c 20 69 74 20 |(ie, "%1|h"), it |
|000035c0| 69 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |is the n|umber of|
|000035d0| 20 69 6e 69 74 69 61 6c | 20 63 68 61 72 61 63 74 | initial| charact|
|000035e0| 65 72 73 20 74 6f 0a 09 | 09 69 6e 74 65 72 70 6f |ers to..|.interpo|
|000035f0| 6c 61 74 65 2e 0a 65 6e | 64 69 6e 67 20 6e 75 6d |late..en|ding num|
|00003600| 62 65 72 09 69 73 20 74 | 68 65 20 6e 75 6d 62 65 |ber.is t|he numbe|
|00003610| 72 20 6f 66 20 74 68 65 | 20 70 6f 73 69 74 69 6f |r of the| positio|
|00003620| 6e 20 6f 66 20 74 68 65 | 20 6c 61 73 74 20 63 68 |n of the| last ch|
|00003630| 61 72 61 63 74 65 72 0a | 09 09 74 6f 20 62 65 20 |aracter.|..to be |
|00003640| 69 6e 74 65 72 70 6f 6c | 61 74 65 64 3b 20 20 73 |interpol|ated; s|
|00003650| 65 65 20 22 62 65 67 69 | 6e 6e 69 6e 67 20 6e 75 |ee "begi|nning nu|
|00003660| 6d 62 65 72 22 20 61 62 | 6f 76 65 2e 0a 66 6f 72 |mber" ab|ove..for|
|00003670| 6d 61 74 20 63 6f 6e 74 | 72 6f 6c 09 63 6f 6e 74 |mat cont|rol.cont|
|00003680| 72 6f 6c 73 20 68 6f 77 | 20 74 68 65 20 77 6f 72 |rols how| the wor|
|00003690| 64 20 69 73 20 69 6e 74 | 65 72 70 6f 6c 61 74 65 |d is int|erpolate|
|000036a0| 64 0a 09 09 09 5e 20 61 | 6c 6c 20 61 6c 70 68 61 |d....^ a|ll alpha|
|000036b0| 62 65 74 69 63 20 63 68 | 61 72 61 63 74 65 72 73 |betic ch|aracters|
|000036c0| 20 61 72 65 20 63 61 70 | 69 74 61 6c 69 7a 65 64 | are cap|italized|
|000036d0| 0a 09 09 09 2a 20 61 6c | 6c 20 61 6c 70 68 61 62 |....* al|l alphab|
|000036e0| 65 74 69 63 20 63 68 61 | 72 61 63 74 65 72 73 20 |etic cha|racters |
|000036f0| 61 72 65 20 6d 61 64 65 | 20 6c 6f 77 65 72 20 63 |are made| lower c|
|00003700| 61 73 65 0a 09 09 09 7c | 20 74 68 65 20 66 69 72 |ase....|| the fir|
|00003710| 73 74 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 |st chara|cter is |
|00003720| 63 61 70 69 74 61 6c 69 | 7a 65 64 20 69 66 20 61 |capitali|zed if a|
|00003730| 6c 70 68 61 62 65 74 69 | 63 0a 09 09 09 23 20 74 |lphabeti|c....# t|
|00003740| 68 65 20 6c 65 6e 67 74 | 68 20 6f 66 20 74 68 65 |he lengt|h of the|
|00003750| 20 73 74 72 69 6e 67 20 | 69 73 20 69 6e 74 65 72 | string |is inter|
|00003760| 70 6f 6c 61 74 65 64 0a | 65 73 63 61 70 65 20 63 |polated.|escape c|
|00003770| 68 61 72 61 63 74 65 72 | 0a 09 09 73 61 79 73 20 |haracter|...says |
|00003780| 77 68 61 74 20 69 73 20 | 74 6f 20 62 65 20 69 6e |what is |to be in|
|00003790| 74 65 72 70 6f 6c 61 74 | 65 64 0a 0a 53 6f 2c 20 |terpolat|ed..So, |
|000037a0| 74 6f 20 6d 61 74 63 68 | 20 70 61 73 73 77 6f 72 |to match| passwor|
|000037b0| 64 73 20 6f 66 20 6c 65 | 6e 67 74 68 20 36 20 6f |ds of le|ngth 6 o|
|000037c0| 72 20 6c 65 73 73 20 77 | 69 74 68 20 6f 6e 6c 79 |r less w|ith only|
|000037d0| 20 27 61 2d 7a 27 20 61 | 73 20 63 68 61 72 61 63 | 'a-z' a|s charac|
|000037e0| 74 65 72 73 3a 0a 09 09 | 28 25 23 70 3c 3d 36 29 |ters:...|(%#p<=6)|
|000037f0| 26 28 22 25 70 22 3d 7e | 22 5b 61 2d 7a 5d 2a 22 |&("%p"=~|"[a-z]*"|
|00003800| 29 0a 54 6f 20 72 65 6a | 65 63 74 20 70 61 73 73 |).To rej|ect pass|
|00003810| 77 6f 72 64 73 20 6f 66 | 20 61 6e 79 20 6c 65 6e |words of| any len|
|00003820| 67 74 68 20 77 69 74 68 | 20 6f 6e 6c 79 20 6f 6e |gth with| only on|
|00003830| 65 20 63 61 73 65 20 61 | 6e 64 20 6f 6e 6c 79 20 |e case a|nd only |
|00003840| 6c 65 74 74 65 72 73 3a | 0a 09 09 28 25 23 76 3d |letters:|...(%#v=|
|00003850| 3d 31 29 26 28 23 25 62 | 3d 3d 23 25 70 29 09 3c |=1)&(#%b|==#%p).<|
|00003860| 6f 72 3e 09 28 25 23 76 | 3d 3d 31 29 26 28 25 2d |or>.(%#v|==1)&(%-|
|00003870| 23 62 3d 3d 30 29 0a 0a | 57 41 52 4e 49 4e 47 3a |#b==0)..|WARNING:|
|00003880| 20 20 49 66 20 79 6f 75 | 20 61 72 65 20 75 73 69 | If you| are usi|
|00003890| 6e 67 20 74 68 65 20 70 | 61 74 74 65 72 6e 20 6d |ng the p|attern m|
|000038a0| 61 74 63 68 65 72 20 74 | 6f 20 6c 6f 6f 6b 20 66 |atcher t|o look f|
|000038b0| 6f 72 20 70 61 73 73 77 | 6f 72 64 73 2c 0a 09 20 |or passw|ords,.. |
|000038c0| 20 41 4c 57 41 59 53 20 | 70 75 74 20 74 68 65 20 | ALWAYS |put the |
|000038d0| 73 74 72 69 6e 67 20 6f | 6e 20 74 68 65 20 6c 65 |string o|n the le|
|000038e0| 66 74 20 61 6e 64 20 74 | 68 65 20 70 61 74 74 65 |ft and t|he patte|
|000038f0| 72 6e 20 6f 6e 20 74 68 | 65 20 72 69 67 68 74 2e |rn on th|e right.|
|00003900| 0a 09 20 20 54 68 65 20 | 70 61 74 74 65 72 6e 20 |.. The |pattern |
|00003910| 6d 61 74 63 68 65 72 20 | 61 73 73 75 6d 65 73 20 |matcher |assumes |
|00003920| 77 68 61 74 20 69 73 20 | 6f 6e 20 74 68 65 20 6c |what is |on the l|
|00003930| 65 66 74 20 69 73 20 61 | 20 73 74 72 69 6e 67 2e |eft is a| string.|
|00003940| 0a 0a 54 68 65 72 65 20 | 61 72 65 20 61 20 66 65 |..There |are a fe|
|00003950| 77 20 6f 74 68 65 72 20 | 74 68 69 6e 67 73 20 74 |w other |things t|
|00003960| 68 61 74 20 63 61 6e 20 | 62 65 20 73 65 74 20 69 |hat can |be set i|
|00003970| 6e 20 74 68 65 20 63 6f | 6e 66 69 67 75 72 61 74 |n the co|nfigurat|
|00003980| 69 6f 6e 20 66 69 6c 65 | 3a 0a 0a 31 2e 20 20 49 |ion file|:..1. I|
|00003990| 6e 74 65 72 70 72 65 74 | 61 74 69 6f 6e 20 6f 66 |nterpret|ation of|
|000039a0| 20 47 45 43 4f 53 20 66 | 69 65 6c 64 0a 09 44 65 | GECOS f|ield..De|
|000039b0| 66 69 6e 65 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |fine the| format |
|000039c0| 79 6f 75 72 20 73 69 74 | 65 20 75 73 65 73 20 77 |your sit|e uses w|
|000039d0| 69 74 68 20 74 68 65 20 | 63 6f 6e 73 74 61 6e 74 |ith the |constant|
|000039e0| 73 20 61 62 6f 76 65 2e | 0a 09 54 68 75 73 2c 20 |s above.|..Thus, |
|000039f0| 77 65 20 75 73 65 20 61 | 20 66 69 65 6c 64 20 6c |we use a| field l|
|00003a00| 69 6b 65 0a 09 09 4d 61 | 74 74 20 42 69 73 68 6f |ike...Ma|tt Bisho|
|00003a10| 70 2c 4e 32 33 30 2d 31 | 30 32 2c 36 39 32 31 0a |p,N230-1|02,6921.|
|00003a20| 09 73 6f 20 74 68 65 20 | 66 6f 72 6d 61 74 20 6c |.so the |format l|
|00003a30| 69 6e 65 20 77 6f 75 6c | 64 20 62 65 20 65 69 74 |ine woul|d be eit|
|00003a40| 68 65 72 3a 0a 09 09 47 | 45 43 4f 53 3a 09 22 25 |her:...G|ECOS:."%|
|00003a50| 73 20 25 73 2c 25 73 2c | 25 73 22 20 66 20 73 20 |s %s,%s,|%s" f s |
|00003a60| 6f 20 74 0a 09 6f 72 0a | 09 09 53 45 54 47 45 43 |o t..or.|..SETGEC|
|00003a70| 4f 53 3a 09 22 25 73 20 | 25 73 2c 25 73 2c 25 73 |OS:."%s |%s,%s,%s|
|00003a80| 22 20 66 20 73 20 6f 20 | 74 0a 09 61 6e 64 20 25 |" f s o |t..and %|
|00003a90| 6d 20 77 6f 75 6c 64 20 | 62 65 20 73 65 74 20 74 |m would |be set t|
|00003aa0| 6f 20 4e 55 4c 20 28 73 | 6f 2c 20 25 69 20 77 6f |o NUL (s|o, %i wo|
|00003ab0| 75 6c 64 20 62 65 20 22 | 4d 42 22 2e 29 20 20 54 |uld be "|MB".) T|
|00003ac0| 68 65 20 6c 65 74 74 65 | 72 73 0a 09 66 6f 6c 6c |he lette|rs..foll|
|00003ad0| 6f 77 69 6e 67 20 74 68 | 65 20 73 74 72 69 6e 67 |owing th|e string|
|00003ae0| 20 61 72 65 20 66 72 6f | 6d 20 74 68 65 20 65 73 | are fro|m the es|
|00003af0| 63 61 70 65 20 6c 69 73 | 74 3b 20 6f 6e 6c 79 20 |cape lis|t; only |
|00003b00| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 0a 09 6d |the foll|owing..m|
|00003b10| 61 79 20 62 65 20 73 6f | 20 73 65 74 3a 0a 09 09 |ay be so| set:...|
|00003b20| 30 20 31 20 32 20 33 20 | 34 20 35 20 36 20 37 20 |0 1 2 3 |4 5 6 7 |
|00003b30| 38 20 39 20 66 20 69 20 | 6d 20 6e 20 6f 20 73 20 |8 9 f i |m n o s |
|00003b40| 74 0a 09 54 68 65 20 70 | 61 72 74 20 69 6e 20 22 |t..The p|art in "|
|00003b50| 2e 2e 2e 22 20 69 73 20 | 75 73 65 64 20 61 73 20 |..." is |used as |
|00003b60| 61 20 66 6f 72 6d 61 74 | 20 61 72 67 75 6d 65 6e |a format| argumen|
|00003b70| 74 20 74 6f 20 73 73 63 | 61 6e 66 2c 20 61 6e 64 |t to ssc|anf, and|
|00003b80| 0a 09 74 68 65 20 47 45 | 43 4f 53 20 66 69 65 6c |..the GE|COS fiel|
|00003b90| 64 20 69 73 20 73 63 61 | 6e 6e 65 64 20 41 46 54 |d is sca|nned AFT|
|00003ba0| 45 52 20 61 6e 79 20 27 | 26 27 20 61 72 65 20 72 |ER any '|&' are r|
|00003bb0| 65 70 6c 61 63 65 64 20 | 62 79 20 74 68 65 0a 09 |eplaced |by the..|
|00003bc0| 6c 6f 67 69 6e 20 6e 61 | 6d 65 2e 20 20 49 66 20 |login na|me. If |
|00003bd0| 61 6e 79 20 6f 66 20 74 | 68 65 20 65 73 63 61 70 |any of t|he escap|
|00003be0| 65 20 63 68 61 72 61 63 | 74 65 72 73 20 61 72 65 |e charac|ters are|
|00003bf0| 20 6e 6f 74 20 6d 61 74 | 63 68 65 64 0a 09 28 66 | not mat|ched..(f|
|00003c00| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 69 66 20 74 |or examp|le, if t|
|00003c10| 68 65 20 47 45 43 4f 53 | 20 66 69 65 6c 64 20 61 |he GECOS| field a|
|00003c20| 62 6f 76 65 20 68 61 64 | 20 6e 6f 20 27 2c 27 29 |bove had| no ',')|
|00003c30| 2c 20 6e 6f 74 68 69 6e | 67 20 69 73 0a 09 72 65 |, nothin|g is..re|
|00003c40| 73 65 74 2e 20 20 53 6f | 2c 20 69 66 20 79 6f 75 |set. So|, if you|
|00003c50| 72 20 70 61 73 73 77 6f | 72 64 20 66 69 6c 65 20 |r passwo|rd file |
|00003c60| 68 61 73 20 73 65 76 65 | 72 61 6c 20 66 6f 72 6d |has seve|ral form|
|00003c70| 61 74 73 20 66 6f 72 20 | 74 68 65 0a 09 47 45 43 |ats for |the..GEC|
|00003c80| 4f 53 20 66 69 65 6c 64 | 2c 20 6a 75 73 74 20 6c |OS field|, just l|
|00003c90| 69 73 74 20 61 6c 6c 20 | 6f 66 20 74 68 65 6d 2c |ist all |of them,|
|00003ca0| 20 61 6e 64 20 74 68 65 | 20 6c 61 73 74 20 6f 6e | and the| last on|
|00003cb0| 65 20 74 68 61 74 20 6d | 61 74 63 68 65 73 0a 09 |e that m|atches..|
|00003cc0| 63 6f 6e 74 72 6f 6c 73 | 20 68 6f 77 20 74 68 69 |controls| how thi|
|00003cd0| 6e 67 73 20 61 72 65 20 | 73 65 74 20 75 70 2e 0a |ngs are |set up..|
|00003ce0| 0a 09 53 65 74 74 69 6e | 67 20 74 68 65 20 47 45 |..Settin|g the GE|
|00003cf0| 43 4f 53 20 66 69 65 6c | 64 20 69 73 20 64 6f 6e |COS fiel|d is don|
|00003d00| 65 20 75 73 69 6e 67 20 | 74 68 69 73 20 69 6e 20 |e using |this in |
|00003d10| 63 6f 6e 6a 75 6e 63 74 | 69 6f 6e 20 77 69 74 68 |conjunct|ion with|
|00003d20| 0a 09 74 77 6f 20 6f 74 | 68 65 72 20 66 6f 72 6d |..two ot|her form|
|00003d30| 61 74 20 6c 69 6e 65 73 | 2e 20 20 57 68 65 6e 20 |at lines|. When |
|00003d40| 72 75 6e 6e 69 6e 67 20 | 69 6e 20 74 68 69 73 20 |running |in this |
|00003d50| 6d 6f 64 65 20 28 69 65 | 2c 20 77 68 65 6e 20 74 |mode (ie|, when t|
|00003d60| 68 65 0a 09 47 45 43 4f | 53 20 66 69 65 6c 64 20 |he..GECO|S field |
|00003d70| 69 73 20 74 6f 20 62 65 | 20 63 68 61 6e 67 65 64 |is to be| changed|
|00003d80| 29 2c 20 74 68 65 20 22 | 47 45 43 4f 53 3a 22 20 |), the "|GECOS:" |
|00003d90| 66 6f 72 6d 61 74 20 6c | 69 6e 65 20 61 62 6f 76 |format l|ine abov|
|00003da0| 65 20 77 69 6c 6c 0a 09 | 73 65 74 20 76 61 72 69 |e will..|set vari|
|00003db0| 61 62 6c 65 73 2e 20 20 | 54 6f 20 68 61 76 65 20 |ables. |To have |
|00003dc0| 74 68 65 20 75 73 65 72 | 20 63 68 61 6e 67 65 20 |the user| change |
|00003dd0| 74 68 65 73 65 20 69 6e | 74 65 72 61 63 74 69 76 |these in|teractiv|
|00003de0| 65 6c 79 2c 20 74 68 65 | 0a 09 66 6f 72 6d 61 74 |ely, the|..format|
|00003df0| 20 6c 69 6e 65 20 22 53 | 45 54 47 45 43 4f 53 3a | line "S|ETGECOS:|
|00003e00| 22 20 6d 75 73 74 20 62 | 65 20 75 73 65 64 3b 20 |" must b|e used; |
|00003e10| 74 68 65 20 75 73 65 72 | 20 77 69 6c 6c 20 62 65 |the user| will be|
|00003e20| 20 61 73 6b 65 64 20 74 | 6f 0a 09 76 65 72 69 66 | asked t|o..verif|
|00003e30| 79 20 6f 72 20 63 68 61 | 6e 67 65 20 74 68 65 20 |y or cha|nge the |
|00003e40| 73 65 74 74 69 6e 67 20 | 6f 66 20 65 61 63 68 20 |setting |of each |
|00003e50| 66 69 65 6c 64 2e 20 0a | 09 41 20 74 68 69 72 64 |field. .|.A third|
|00003e60| 20 66 6f 72 6d 61 74 20 | 6c 69 6e 65 2c 20 22 46 | format |line, "F|
|00003e70| 4f 52 43 45 47 45 43 4f | 53 3a 22 2c 20 73 68 6f |ORCEGECO|S:", sho|
|00003e80| 75 6c 64 20 61 70 70 65 | 61 72 20 6c 61 73 74 2e |uld appe|ar last.|
|00003e90| 20 20 54 68 69 73 0a 09 | 66 6f 72 6d 61 74 20 6c | This..|format l|
|00003ea0| 69 6e 65 20 69 73 20 69 | 67 6e 6f 72 65 64 20 65 |ine is i|gnored e|
|00003eb0| 78 63 65 70 74 20 77 68 | 65 6e 20 74 68 65 20 47 |xcept wh|en the G|
|00003ec0| 45 43 4f 53 20 66 69 65 | 6c 64 20 69 73 20 62 65 |ECOS fie|ld is be|
|00003ed0| 69 6e 67 20 63 68 61 6e | 67 65 64 3b 0a 09 69 6e |ing chan|ged;..in|
|00003ee0| 20 74 68 61 74 20 63 61 | 73 65 2c 20 69 66 20 6e | that ca|se, if n|
|00003ef0| 6f 20 22 53 45 54 47 45 | 43 4f 53 3a 22 20 6c 69 |o "SETGE|COS:" li|
|00003f00| 6e 65 20 6d 61 74 63 68 | 65 64 2c 20 74 68 65 20 |ne match|ed, the |
|00003f10| 75 73 65 72 20 77 69 6c | 6c 0a 09 62 65 20 70 72 |user wil|l..be pr|
|00003f20| 6f 6d 70 74 65 64 20 75 | 73 69 6e 67 20 74 68 65 |ompted u|sing the|
|00003f30| 20 66 6f 72 6d 61 74 20 | 6f 66 20 74 68 61 74 20 | format |of that |
|00003f40| 6c 69 6e 65 20 61 6e 64 | 20 74 68 65 20 47 45 43 |line and| the GEC|
|00003f50| 4f 53 20 66 69 65 6c 64 | 0a 09 77 69 6c 6c 20 62 |OS field|..will b|
|00003f60| 72 20 77 72 69 74 74 65 | 6e 20 6f 75 74 20 69 6e |r writte|n out in|
|00003f70| 20 74 68 61 74 20 66 6f | 72 6d 61 74 2e 0a 0a 32 | that fo|rmat...2|
|00003f80| 2e 20 20 53 65 74 74 69 | 6e 67 20 4f 74 68 65 72 |. Setti|ng Other|
|00003f90| 20 56 61 72 69 61 62 6c | 65 73 0a 09 4a 75 73 74 | Variabl|es..Just|
|00003fa0| 20 69 6e 20 63 61 73 65 | 20 74 68 65 72 65 20 69 | in case| there i|
|00003fb0| 73 20 6e 6f 20 47 45 43 | 4f 53 20 66 69 65 6c 64 |s no GEC|OS field|
|00003fc0| 2c 20 79 6f 75 20 61 72 | 65 20 61 6c 6c 6f 77 65 |, you ar|e allowe|
|00003fd0| 64 20 74 6f 20 73 65 74 | 0a 09 74 68 65 20 76 61 |d to set|..the va|
|00003fe0| 72 69 61 62 6c 65 73 20 | 75 73 69 6e 67 20 61 20 |riables |using a |
|00003ff0| 22 53 45 54 22 20 73 74 | 61 74 65 6d 65 6e 74 2c |"SET" st|atement,|
|00004000| 20 61 73 20 66 6f 6c 6c | 6f 77 73 3a 0a 09 09 53 | as foll|ows:...S|
|00004010| 45 54 3a 09 6e 09 22 68 | 6f 77 69 65 22 0a 09 54 |ET:.n."h|owie"..T|
|00004020| 68 65 20 73 74 72 69 6e | 67 20 6d 61 79 20 62 65 |he strin|g may be|
|00004030| 20 72 65 70 6c 61 63 65 | 64 20 62 79 20 61 20 66 | replace|d by a f|
|00004040| 69 6c 65 20 6e 61 6d 65 | 2c 20 69 6e 20 5b 20 5d |ile name|, in [ ]|
|00004050| 2c 20 6f 72 20 70 72 6f | 67 72 61 6d 0a 09 6f 75 |, or pro|gram..ou|
|00004060| 74 70 75 74 2c 20 69 6e | 20 7b 20 7d 2c 20 69 6e |tput, in| { }, in|
|00004070| 20 77 68 69 63 68 20 63 | 61 73 65 20 74 68 65 20 | which c|ase the |
|00004080| 66 69 72 73 74 20 6c 69 | 6e 65 20 6f 66 20 74 68 |first li|ne of th|
|00004090| 65 20 6f 75 74 70 75 74 | 20 6f 72 0a 09 66 69 6c |e output| or..fil|
|000040a0| 65 20 62 65 63 6f 6d 65 | 73 20 74 68 65 20 76 61 |e become|s the va|
|000040b0| 6c 75 65 20 6f 66 20 74 | 68 65 20 76 61 72 69 61 |lue of t|he varia|
|000040c0| 62 6c 65 2e 20 20 4e 6f | 74 65 20 69 74 20 77 69 |ble. No|te it wi|
|000040d0| 6c 6c 20 61 6c 77 61 79 | 73 0a 09 62 65 20 61 20 |ll alway|s..be a |
|000040e0| 73 74 72 69 6e 67 2e 0a | 0a 32 2e 20 20 4e 75 6d |string..|.2. Num|
|000040f0| 62 65 72 20 6f 66 20 73 | 69 67 6e 69 66 69 63 61 |ber of s|ignifica|
|00004100| 6e 74 20 63 68 61 72 61 | 63 74 65 72 73 20 69 6e |nt chara|cters in|
|00004110| 20 74 68 65 20 70 61 73 | 73 77 6f 72 64 0a 09 42 | the pas|sword..B|
|00004120| 79 20 64 65 66 61 75 6c | 74 2c 20 61 6c 6c 20 70 |y defaul|t, all p|
|00004130| 61 74 74 65 72 6e 20 6d | 61 74 63 68 69 6e 67 20 |attern m|atching |
|00004140| 61 6e 64 20 73 74 72 69 | 6e 67 20 63 6f 6d 70 61 |and stri|ng compa|
|00004150| 72 65 73 20 75 73 65 20 | 74 68 65 0a 09 66 69 72 |res use |the..fir|
|00004160| 73 74 20 38 20 63 68 61 | 72 61 63 74 65 72 73 20 |st 8 cha|racters |
|00004170| 6f 66 20 74 68 65 20 70 | 61 73 73 77 6f 72 64 2e |of the p|assword.|
|00004180| 20 20 54 6f 20 63 68 61 | 6e 67 65 20 74 68 69 73 | To cha|nge this|
|00004190| 2c 20 70 75 74 20 74 68 | 65 0a 09 66 6f 6c 6c 6f |, put th|e..follo|
|000041a0| 77 69 6e 67 20 6c 69 6e | 65 20 69 6e 20 74 68 65 |wing lin|e in the|
|000041b0| 20 66 69 6c 65 3a 0a 09 | 09 53 49 47 43 48 41 52 | file:..|.SIGCHAR|
|000041c0| 53 3a 09 36 0a 09 54 68 | 69 73 20 6d 61 6b 65 73 |S:.6..Th|is makes|
|000041d0| 20 36 20 63 68 61 72 61 | 63 74 65 72 73 20 73 69 | 6 chara|cters si|
|000041e0| 67 6e 69 66 69 63 61 6e | 74 2e 20 20 49 66 20 74 |gnifican|t. If t|
|000041f0| 68 65 20 36 20 77 65 72 | 65 20 72 65 70 6c 61 63 |he 6 wer|e replac|
|00004200| 65 64 20 62 79 20 30 2c | 0a 09 41 4c 4c 20 63 68 |ed by 0,|..ALL ch|
|00004210| 61 72 61 63 74 65 72 73 | 20 77 6f 75 6c 64 20 62 |aracters| would b|
|00004220| 65 20 73 69 67 6e 69 66 | 69 63 61 6e 74 2e 20 20 |e signif|icant. |
|00004230| 4f 6e 6c 79 20 74 68 65 | 20 66 69 72 73 74 20 6e |Only the| first n|
|00004240| 75 6d 62 65 72 20 69 73 | 20 75 73 65 64 3b 0a 09 |umber is| used;..|
|00004250| 61 6e 79 20 6f 74 68 65 | 72 73 20 61 72 65 20 69 |any othe|rs are i|
|00004260| 67 6e 6f 72 65 64 2e 0a | 09 20 20 20 53 75 70 70 |gnored..|. Supp|
|00004270| 6f 73 65 20 74 68 65 72 | 65 20 61 72 65 20 6e 20 |ose ther|e are n |
|00004280| 73 69 67 6e 69 66 69 63 | 61 6e 74 20 63 68 61 72 |signific|ant char|
|00004290| 61 63 74 65 72 73 2e 20 | 20 53 74 72 69 6e 67 20 |acters. | String |
|000042a0| 63 6f 6d 70 61 72 69 73 | 6f 6e 73 0a 09 61 72 65 |comparis|ons..are|
|000042b0| 20 64 6f 6e 65 20 6f 6e | 20 74 68 65 20 66 69 72 | done on| the fir|
|000042c0| 73 74 20 6e 20 63 68 61 | 72 61 63 74 65 72 73 20 |st n cha|racters |
|000042d0| 6f 66 20 74 68 65 20 73 | 74 72 69 6e 67 73 20 4f |of the s|trings O|
|000042e0| 4e 4c 59 2e 20 20 50 61 | 74 74 65 72 6e 0a 09 6d |NLY. Pa|ttern..m|
|000042f0| 61 74 63 68 65 73 20 61 | 72 65 20 64 6f 6e 65 20 |atches a|re done |
|00004300| 6f 6e 20 61 20 70 61 73 | 73 77 6f 72 64 20 6f 66 |on a pas|sword of|
|00004310| 20 6c 65 6e 67 74 68 20 | 6e 3b 20 63 68 61 72 61 | length |n; chara|
|00004320| 63 74 65 72 73 20 61 66 | 74 65 72 20 74 68 65 0a |cters af|ter the.|
|00004330| 09 28 6e 2d 31 29 73 74 | 20 61 72 65 20 49 47 4e |.(n-1)st| are IGN|
|00004340| 4f 52 45 44 2e 20 20 49 | 66 20 6e 20 69 73 20 30 |ORED. I|f n is 0|
|00004350| 2c 20 69 74 20 69 73 20 | 28 69 6e 74 65 72 6e 61 |, it is |(interna|
|00004360| 6c 6c 79 29 20 74 72 65 | 61 74 65 64 20 61 73 0a |lly) tre|ated as.|
|00004370| 09 62 65 69 6e 67 20 74 | 68 65 20 73 61 6d 65 20 |.being t|he same |
|00004380| 61 73 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |as the l|ength of|
|00004390| 20 74 68 65 20 70 61 73 | 73 77 6f 72 64 2e 20 20 | the pas|sword. |
|000043a0| 54 68 65 20 61 69 6d 20 | 69 73 20 74 6f 0a 09 70 |The aim |is to..p|
|000043b0| 72 65 76 65 6e 74 20 61 | 20 75 73 65 72 20 66 72 |revent a| user fr|
|000043c0| 6f 6d 20 73 65 74 74 69 | 6e 67 20 68 69 73 2f 68 |om setti|ng his/h|
|000043d0| 65 72 20 70 61 73 73 77 | 6f 72 64 20 74 6f 20 22 |er passw|ord to "|
|000043e0| 61 6d 62 69 64 65 78 74 | 22 2c 20 77 68 69 63 68 |ambidext|", which|
|000043f0| 0a 09 69 73 20 6e 6f 74 | 20 69 6e 20 74 68 65 20 |..is not| in the |
|00004400| 64 69 63 74 69 6f 6e 61 | 72 79 2c 20 62 75 74 20 |dictiona|ry, but |
|00004410| 77 69 6c 6c 20 73 74 69 | 6c 6c 20 62 65 20 66 6f |will sti|ll be fo|
|00004420| 75 6e 64 20 62 79 20 61 | 20 64 69 63 74 69 6f 6e |und by a| diction|
|00004430| 61 72 79 0a 09 73 65 61 | 72 63 68 20 77 68 65 6e |ary..sea|rch when|
|00004440| 20 74 68 65 20 64 69 63 | 74 69 6f 6e 61 72 79 20 | the dic|tionary |
|00004450| 77 6f 72 64 20 22 61 6d | 62 69 64 65 78 74 72 6f |word "am|bidextro|
|00004460| 75 73 6c 79 22 20 49 53 | 20 74 72 69 65 64 2e 0a |usly" IS| tried..|
|00004470| 09 20 20 20 4f 6e 20 6d | 6f 73 74 20 55 4e 49 58 |. On m|ost UNIX|
|00004480| 20 73 79 73 74 65 6d 73 | 2c 20 74 68 65 72 65 20 | systems|, there |
|00004490| 6d 61 79 20 6e 6f 74 20 | 62 65 20 6d 6f 72 65 20 |may not |be more |
|000044a0| 74 68 61 6e 20 38 20 73 | 69 67 6e 69 66 69 63 61 |than 8 s|ignifica|
|000044b0| 6e 74 0a 09 63 68 61 72 | 61 63 74 65 72 73 20 69 |nt..char|acters i|
|000044c0| 6e 20 74 68 65 20 70 61 | 73 73 77 6f 72 64 20 62 |n the pa|ssword b|
|000044d0| 65 63 61 75 73 65 20 74 | 68 65 20 70 61 73 73 77 |ecause t|he passw|
|000044e0| 6f 72 64 20 72 65 61 64 | 69 6e 67 20 72 6f 75 74 |ord read|ing rout|
|000044f0| 69 6e 65 0a 09 77 69 6c | 6c 20 6f 6e 6c 79 20 72 |ine..wil|l only r|
|00004500| 65 61 64 20 74 68 65 20 | 66 69 72 73 74 20 38 2c |ead the |first 8,|
|00004510| 20 61 6e 64 20 64 69 73 | 63 61 72 64 20 74 68 65 | and dis|card the|
|00004520| 20 72 65 73 74 2e 20 20 | 28 44 6f 6e 27 74 20 62 | rest. |(Don't b|
|00004530| 6f 74 68 65 72 0a 09 63 | 68 61 6e 67 69 6e 67 20 |other..c|hanging |
|00004540| 74 68 61 74 20 72 6f 75 | 74 69 6e 65 20 74 6f 20 |that rou|tine to |
|00004550| 66 69 78 20 74 68 69 73 | 3b 20 74 68 65 20 65 6e |fix this|; the en|
|00004560| 63 72 79 70 74 69 6f 6e | 20 66 75 6e 63 74 69 6f |cryption| functio|
|00004570| 6e 20 61 6c 73 6f 0a 09 | 6f 6e 6c 79 20 75 73 65 |n also..|only use|
|00004580| 73 20 74 68 65 20 66 69 | 72 73 74 20 38 20 63 68 |s the fi|rst 8 ch|
|00004590| 61 72 61 63 74 65 72 73 | 2e 29 20 20 49 6e 20 74 |aracters|.) In t|
|000045a0| 68 69 73 20 63 61 73 65 | 2c 20 73 65 74 74 69 6e |his case|, settin|
|000045b0| 67 20 74 68 65 20 6e 75 | 6d 62 65 72 0a 09 6f 66 |g the nu|mber..of|
|000045c0| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 20 63 68 61 | signifi|cant cha|
|000045d0| 72 61 63 74 65 72 73 20 | 74 6f 20 6d 6f 72 65 20 |racters |to more |
|000045e0| 74 68 61 6e 20 38 20 63 | 61 75 73 65 73 20 6f 6e |than 8 c|auses on|
|000045f0| 6c 79 20 74 68 65 20 66 | 69 72 73 74 20 38 0a 09 |ly the f|irst 8..|
|00004600| 63 68 61 72 61 63 74 65 | 72 73 20 74 6f 20 62 65 |characte|rs to be|
|00004610| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 2e 20 20 54 | signifi|cant. T|
|00004620| 68 65 72 65 20 69 73 20 | 61 6e 20 69 6e 74 65 72 |here is |an inter|
|00004630| 6e 61 6c 20 6c 69 6d 69 | 74 20 6f 6e 20 68 6f 77 |nal limi|t on how|
|00004640| 0a 09 6d 61 6e 79 20 63 | 68 61 72 61 63 74 65 72 |..many c|haracter|
|00004650| 73 20 6d 61 79 20 62 65 | 20 73 69 67 6e 69 66 69 |s may be| signifi|
|00004660| 63 61 6e 74 2c 20 62 75 | 74 20 69 74 20 69 73 20 |cant, bu|t it is |
|00004670| 76 65 72 79 20 67 65 6e | 65 72 6f 75 73 0a 09 28 |very gen|erous..(|
|00004680| 63 75 72 72 65 6e 74 6c | 79 2c 20 31 30 32 33 2e |currentl|y, 1023.|
|00004690| 29 0a 0a 33 2e 20 20 45 | 72 72 6f 72 20 6d 65 73 |)..3. E|rror mes|
|000046a0| 73 61 67 65 73 0a 09 57 | 68 65 6e 20 61 20 70 61 |sages..W|hen a pa|
|000046b0| 73 73 77 6f 72 64 20 73 | 61 74 69 73 66 69 65 73 |ssword s|atisfies|
|000046c0| 20 61 20 74 65 73 74 20 | 69 6e 20 74 68 65 20 70 | a test |in the p|
|000046d0| 61 73 73 77 6f 72 64 20 | 66 69 6c 65 2c 20 62 79 |assword |file, by|
|000046e0| 20 64 65 66 61 75 6c 74 | 0a 09 74 68 65 20 65 72 | default|..the er|
|000046f0| 72 6f 72 20 6d 65 73 73 | 61 67 65 20 22 70 61 73 |ror mess|age "pas|
|00004700| 73 77 6f 72 64 20 69 6e | 76 61 6c 69 64 20 2d 2d |sword in|valid --|
|00004710| 20 6e 6f 20 63 68 61 6e | 67 65 22 20 69 73 20 70 | no chan|ge" is p|
|00004720| 72 69 6e 74 65 64 2e 0a | 09 54 68 69 73 20 69 73 |rinted..|.This is|
|00004730| 20 75 6e 68 65 6c 70 66 | 75 6c 2c 20 74 6f 20 73 | unhelpf|ul, to s|
|00004740| 61 79 20 74 68 65 20 6c | 65 61 73 74 2e 20 20 55 |ay the l|east. U|
|00004750| 73 65 72 73 20 73 68 6f | 75 6c 64 20 62 65 20 74 |sers sho|uld be t|
|00004760| 6f 6c 64 20 77 68 79 0a | 09 74 68 65 69 72 20 63 |old why.|.their c|
|00004770| 68 6f 69 63 65 20 6f 66 | 20 70 61 73 73 77 6f 72 |hoice of| passwor|
|00004780| 64 20 69 73 20 6e 6f 74 | 20 73 75 69 74 61 62 6c |d is not| suitabl|
|00004790| 65 2e 20 20 54 6f 20 63 | 61 75 73 65 20 61 20 73 |e. To c|ause a s|
|000047a0| 70 65 63 69 66 69 63 0a | 09 65 72 72 6f 72 20 6d |pecific.|.error m|
|000047b0| 65 73 73 61 67 65 20 74 | 6f 20 62 65 20 70 72 69 |essage t|o be pri|
|000047c0| 6e 74 65 64 20 77 68 65 | 6e 20 61 20 70 61 73 73 |nted whe|n a pass|
|000047d0| 77 6f 72 64 20 73 61 74 | 69 73 66 69 65 73 20 61 |word sat|isfies a|
|000047e0| 20 67 69 76 65 6e 20 74 | 65 73 74 2c 0a 09 70 75 | given t|est,..pu|
|000047f0| 74 20 74 68 65 20 65 72 | 72 6f 72 20 6d 65 73 73 |t the er|ror mess|
|00004800| 61 67 65 20 6f 6e 20 74 | 68 65 20 73 61 6d 65 20 |age on t|he same |
|00004810| 6c 69 6e 65 20 61 73 20 | 74 68 65 20 74 65 73 74 |line as |the test|
|00004820| 20 61 6e 64 20 73 65 70 | 61 72 61 74 65 20 69 74 | and sep|arate it|
|00004830| 0a 09 77 69 74 68 20 61 | 20 74 61 62 20 63 68 61 |..with a| tab cha|
|00004840| 72 61 63 74 65 72 3b 20 | 74 68 75 73 2c 20 69 66 |racter; |thus, if|
|00004850| 20 61 20 75 73 65 72 20 | 61 73 6b 65 64 20 68 69 | a user |asked hi|
|00004860| 73 2f 68 65 72 20 70 61 | 73 73 77 6f 72 64 20 74 |s/her pa|ssword t|
|00004870| 6f 0a 09 62 65 20 63 68 | 61 6e 67 65 64 20 74 6f |o..be ch|anged to|
|00004880| 20 68 69 73 2f 68 65 72 | 20 6c 6f 67 69 6e 20 6e | his/her| login n|
|00004890| 61 6d 65 2c 20 74 68 65 | 20 6c 69 6e 65 0a 09 22 |ame, the| line.."|
|000048a0| 25 70 22 3d 3d 22 25 75 | 22 3c 74 61 62 3e 70 61 |%p"=="%u|"<tab>pa|
|000048b0| 73 73 77 6f 72 64 20 63 | 61 6e 6e 6f 74 20 62 65 |ssword c|annot be|
|000048c0| 20 79 6f 75 72 20 6c 6f | 67 69 6e 20 6e 61 6d 65 | your lo|gin name|
|000048d0| 0a 09 77 6f 75 6c 64 20 | 63 61 75 73 65 20 74 68 |..would |cause th|
|000048e0| 65 20 70 72 6f 70 6f 73 | 65 64 20 70 61 73 73 77 |e propos|ed passw|
|000048f0| 6f 72 64 20 74 6f 20 62 | 65 20 72 65 6a 65 63 74 |ord to b|e reject|
|00004900| 65 64 20 61 6e 64 20 74 | 68 65 20 65 72 72 6f 72 |ed and t|he error|
|00004910| 20 6d 65 73 73 61 67 65 | 0a 09 22 70 61 73 73 77 | message|.."passw|
|00004920| 6f 72 64 20 63 61 6e 6e | 6f 74 20 62 65 20 79 6f |ord cann|ot be yo|
|00004930| 75 72 20 6c 6f 67 69 6e | 20 6e 61 6d 65 22 20 74 |ur login| name" t|
|00004940| 6f 20 62 65 20 70 72 69 | 6e 74 65 64 2e 0a 0a 34 |o be pri|nted...4|
|00004950| 2e 20 20 43 6f 6d 6d 65 | 6e 74 20 6c 69 6e 65 73 |. Comme|nt lines|
|00004960| 0a 09 49 66 20 74 68 65 | 20 66 69 72 73 74 20 63 |..If the| first c|
|00004970| 68 61 72 61 63 74 65 72 | 20 6f 66 20 61 20 6c 69 |haracter| of a li|
|00004980| 6e 65 20 69 73 20 27 23 | 27 2c 20 74 68 65 20 6c |ne is '#|', the l|
|00004990| 69 6e 65 20 69 73 20 61 | 20 63 6f 6d 6d 65 6e 74 |ine is a| comment|
|000049a0| 0a 09 61 6e 64 20 69 73 | 20 69 67 6e 6f 72 65 64 |..and is| ignored|
|000049b0| 2e 0a 0a 35 2e 20 20 57 | 68 61 74 20 63 61 6e 20 |...5. W|hat can |
|000049c0| 62 65 20 6c 6f 67 67 65 | 64 0a 09 44 69 66 66 65 |be logge|d..Diffe|
|000049d0| 72 65 6e 74 20 74 79 70 | 65 73 20 6f 66 20 6c 6f |rent typ|es of lo|
|000049e0| 67 67 69 6e 67 20 6d 61 | 79 20 62 65 20 64 6f 6e |gging ma|y be don|
|000049f0| 65 3a 0a 09 09 73 79 73 | 74 65 6d 09 09 6c 6f 67 |e:...sys|tem..log|
|00004a00| 73 20 73 79 73 74 65 6d | 20 65 72 72 6f 72 73 20 |s system| errors |
|00004a10| 77 68 69 63 68 20 6d 61 | 79 20 6f 72 20 6d 61 79 |which ma|y or may|
|00004a20| 20 6e 6f 74 0a 09 09 09 | 09 62 65 20 61 6e 6e 6f | not....|.be anno|
|00004a30| 75 6e 63 65 64 20 74 6f | 20 74 68 65 20 75 73 65 |unced to| the use|
|00004a40| 72 0a 09 09 75 73 65 09 | 09 6c 6f 67 73 20 77 68 |r...use.|.logs wh|
|00004a50| 6f 20 69 73 20 75 73 69 | 6e 67 20 74 68 65 20 70 |o is usi|ng the p|
|00004a60| 72 6f 67 72 61 6d 2c 20 | 77 68 6f 73 65 20 70 61 |rogram, |whose pa|
|00004a70| 73 73 77 6f 72 64 0a 09 | 09 09 09 69 73 20 62 65 |ssword..|...is be|
|00004a80| 69 6e 67 20 63 68 61 6e | 67 65 64 2c 20 61 6e 64 |ing chan|ged, and|
|00004a90| 20 74 68 65 20 70 61 73 | 73 77 6f 72 64 20 66 69 | the pas|sword fi|
|00004aa0| 6c 65 20 69 6e 0a 09 09 | 09 09 77 68 69 63 68 20 |le in...|..which |
|00004ab0| 69 74 20 69 73 20 62 65 | 69 6e 67 20 63 68 61 6e |it is be|ing chan|
|00004ac0| 67 65 64 0a 09 09 72 65 | 73 75 6c 74 09 09 6c 6f |ged...re|sult..lo|
|00004ad0| 67 73 20 74 68 65 20 72 | 65 73 75 6c 74 20 28 73 |gs the r|esult (s|
|00004ae0| 75 63 63 65 73 73 20 6f | 72 20 66 61 69 6c 75 72 |uccess o|r failur|
|00004af0| 65 29 20 6f 66 20 74 68 | 65 0a 09 09 09 09 61 74 |e) of th|e.....at|
|00004b00| 74 65 6d 70 74 65 64 20 | 63 68 61 6e 67 65 0a 09 |tempted |change..|
|00004b10| 09 73 79 6e 74 61 78 09 | 09 6c 6f 67 73 20 61 6e |.syntax.|.logs an|
|00004b20| 79 20 73 79 6e 74 61 78 | 20 65 72 72 6f 72 73 20 |y syntax| errors |
|00004b30| 69 6e 20 47 45 43 4f 53 | 2c 20 4c 4f 47 54 59 50 |in GECOS|, LOGTYP|
|00004b40| 45 2c 20 6f 72 0a 09 09 | 09 09 74 65 73 74 20 6c |E, or...|..test l|
|00004b50| 69 6e 65 73 3b 20 69 66 | 20 61 20 74 65 73 74 20 |ines; if| a test |
|00004b60| 68 61 73 20 61 20 73 79 | 6e 74 61 78 20 65 72 72 |has a sy|ntax err|
|00004b70| 6f 72 2c 20 69 74 0a 09 | 09 09 09 66 61 69 6c 73 |or, it..|...fails|
|00004b80| 0a 09 09 69 74 65 6d 09 | 09 69 66 20 74 68 65 20 |...item.|.if the |
|00004b90| 70 61 73 73 77 6f 72 64 | 20 69 73 20 6e 6f 74 20 |password| is not |
|00004ba0| 63 68 61 6e 67 65 64 2c | 20 74 68 69 73 20 6c 6f |changed,| this lo|
|00004bb0| 67 73 20 74 68 65 0a 09 | 09 09 09 6c 69 6e 65 20 |gs the..|...line |
|00004bc0| 6e 75 6d 62 65 72 20 6f | 66 20 74 68 65 20 73 70 |number o|f the sp|
|00004bd0| 65 63 69 66 69 63 20 74 | 65 73 74 20 74 68 61 74 |ecific t|est that|
|00004be0| 20 70 61 73 73 65 64 0a | 09 09 09 09 61 6e 64 20 | passed.|....and |
|00004bf0| 74 68 65 20 65 72 72 6f | 72 20 6d 65 73 73 61 67 |the erro|r messag|
|00004c00| 65 20 67 69 76 65 6e 20 | 74 6f 20 74 68 65 20 75 |e given |to the u|
|00004c10| 73 65 72 0a 09 09 64 65 | 62 75 67 09 09 74 68 69 |ser...de|bug..thi|
|00004c20| 73 20 69 73 20 75 73 65 | 64 20 66 6f 72 20 64 65 |s is use|d for de|
|00004c30| 62 75 67 67 69 6e 67 3b | 20 69 74 20 70 72 69 6e |bugging;| it prin|
|00004c40| 74 73 20 61 6c 6c 0a 09 | 09 09 09 70 61 72 61 6d |ts all..|...param|
|00004c50| 65 74 65 72 73 20 73 65 | 74 20 62 79 20 47 45 43 |eters se|t by GEC|
|00004c60| 4f 53 20 61 6e 64 20 53 | 49 47 43 48 41 52 53 20 |OS and S|IGCHARS |
|00004c70| 6c 69 6e 65 73 2c 0a 09 | 09 09 09 61 6e 64 20 74 |lines,..|...and t|
|00004c80| 68 65 20 62 75 66 66 65 | 72 20 70 61 73 73 65 64 |he buffe|r passed|
|00004c90| 20 74 6f 20 65 61 63 68 | 20 74 65 73 74 0a 09 4c | to each| test..L|
|00004ca0| 6f 67 67 69 6e 67 20 69 | 73 20 63 6f 6e 74 72 6f |ogging i|s contro|
|00004cb0| 6c 6c 65 64 20 62 79 20 | 61 20 6c 69 6e 65 20 6f |lled by |a line o|
|00004cc0| 66 20 74 68 65 20 66 6f | 72 6d 0a 09 09 4c 4f 47 |f the fo|rm...LOG|
|00004cd0| 54 59 50 45 3a 09 74 79 | 70 65 2c 74 79 70 65 2c |TYPE:.ty|pe,type,|
|00004ce0| 2e 2e 2e 0a 09 69 6e 20 | 74 68 65 20 74 65 73 74 |.....in |the test|
|00004cf0| 20 66 69 6c 65 2e 20 20 | 54 68 65 20 74 79 70 65 | file. |The type|
|00004d00| 73 20 61 72 65 20 65 76 | 61 6c 75 61 74 65 64 20 |s are ev|aluated |
|00004d10| 69 6e 20 6f 72 64 65 72 | 2c 20 61 6e 64 20 69 6e |in order|, and in|
|00004d20| 69 74 69 61 6c 6c 79 0a | 09 74 68 65 20 74 79 70 |itially.|.the typ|
|00004d30| 65 73 20 6f 66 20 6c 6f | 67 67 69 6e 67 20 64 6f |es of lo|gging do|
|00004d40| 6e 65 20 61 72 65 20 4c | 4f 47 5f 44 45 46 41 55 |ne are L|OG_DEFAU|
|00004d50| 4c 54 2c 20 63 75 72 72 | 65 6e 74 6c 79 20 22 73 |LT, curr|ently "s|
|00004d60| 79 73 74 65 6d 2c 73 79 | 6e 74 61 78 22 2e 20 0a |ystem,sy|ntax". .|
|00004d70| 09 54 6f 20 74 75 72 6e | 20 6f 66 66 20 61 6c 6c |.To turn| off all|
|00004d80| 20 6c 6f 67 67 69 6e 67 | 2c 20 75 73 65 20 22 63 | logging|, use "c|
|00004d90| 6c 65 61 72 22 3b 20 74 | 6f 20 74 75 72 6e 20 6f |lear"; t|o turn o|
|00004da0| 6e 20 61 6c 6c 20 74 79 | 70 65 73 20 6f 66 20 6c |n all ty|pes of l|
|00004db0| 6f 67 67 69 6e 67 2c 0a | 09 75 73 65 20 22 61 6c |ogging,.|.use "al|
|00004dc0| 6c 22 3b 20 74 6f 20 74 | 75 72 6e 20 6f 66 66 20 |l"; to t|urn off |
|00004dd0| 73 70 65 63 69 66 69 63 | 20 74 79 70 65 73 20 6f |specific| types o|
|00004de0| 66 20 6c 6f 67 67 69 6e | 67 2c 20 70 75 74 20 22 |f loggin|g, put "|
|00004df0| 21 22 20 69 6e 20 66 72 | 6f 6e 74 20 6f 66 0a 09 |!" in fr|ont of..|
|00004e00| 74 68 65 20 74 79 70 65 | 2e 20 20 46 6f 72 20 65 |the type|. For e|
|00004e10| 78 61 6d 70 6c 65 2c 20 | 22 63 6c 65 61 72 2c 61 |xample, |"clear,a|
|00004e20| 6c 6c 2c 21 73 79 73 74 | 65 6d 22 20 74 75 72 6e |ll,!syst|em" turn|
|00004e30| 73 20 6f 6e 20 61 6c 6c | 20 74 79 70 65 73 20 6f |s on all| types o|
|00004e40| 66 0a 09 6c 6f 67 67 69 | 6e 67 20 65 78 63 65 70 |f..loggi|ng excep|
|00004e50| 74 20 73 79 73 74 65 6d | 20 6c 6f 67 67 69 6e 67 |t system| logging|
|00004e60| 2e 20 20 53 61 79 69 6e | 67 20 22 75 73 65 2c 72 |. Sayin|g "use,r|
|00004e70| 65 73 75 6c 74 2c 73 79 | 6e 74 61 78 2c 69 74 65 |esult,sy|ntax,ite|
|00004e80| 6d 2c 64 65 62 75 67 22 | 0a 09 77 6f 75 6c 64 20 |m,debug"|..would |
|00004e90| 6e 6f 74 20 64 6f 20 74 | 68 65 20 73 61 6d 65 20 |not do t|he same |
|00004ea0| 74 68 69 6e 67 2c 20 73 | 69 6e 63 65 20 69 6e 69 |thing, s|ince ini|
|00004eb0| 74 69 61 6c 6c 79 20 22 | 73 79 6e 74 61 78 22 20 |tially "|syntax" |
|00004ec0| 6c 6f 67 67 69 6e 67 20 | 69 73 20 6f 6e 0a 09 61 |logging |is on..a|
|00004ed0| 6e 64 20 74 68 65 20 6f | 74 68 65 72 20 74 79 70 |nd the o|ther typ|
|00004ee0| 65 73 20 61 72 65 20 6a | 75 73 74 20 6f 72 27 65 |es are j|ust or'e|
|00004ef0| 64 20 69 6e 2e 0a 0a 09 | 54 68 65 72 65 20 61 72 |d in....|There ar|
|00004f00| 65 20 66 6f 75 72 20 77 | 61 79 73 20 6c 6f 67 67 |e four w|ays logg|
|00004f10| 69 6e 67 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ing info|rmation |
|00004f20| 63 61 6e 20 62 65 20 64 | 65 61 6c 74 20 77 69 74 |can be d|ealt wit|
|00004f30| 68 2e 0a 09 7c 20 63 6f | 6d 6d 61 6e 64 09 09 6c |h...| co|mmand..l|
|00004f40| 6f 67 67 69 6e 67 20 6f | 75 74 70 75 74 20 69 73 |ogging o|utput is|
|00004f50| 20 75 73 65 64 20 61 73 | 20 69 6e 70 75 74 20 74 | used as| input t|
|00004f60| 6f 20 63 6f 6d 6d 61 6e | 64 0a 09 3e 20 66 69 6c |o comman|d..> fil|
|00004f70| 65 09 09 09 6c 6f 67 67 | 69 6e 67 20 6f 75 74 70 |e...logg|ing outp|
|00004f80| 75 74 20 69 73 20 61 70 | 70 65 6e 64 65 64 20 74 |ut is ap|pended t|
|00004f90| 6f 20 66 69 6c 65 0a 09 | 73 79 73 6c 6f 67 09 09 |o file..|syslog..|
|00004fa0| 09 6c 6f 67 67 69 6e 67 | 20 6f 75 74 70 75 74 20 |.logging| output |
|00004fb0| 69 73 20 77 72 69 74 74 | 65 6e 20 74 6f 20 22 73 |is writt|en to "s|
|00004fc0| 79 73 6c 6f 67 22 0a 09 | 73 74 64 65 72 72 09 09 |yslog"..|stderr..|
|00004fd0| 09 6c 6f 67 67 69 6e 67 | 20 6f 75 74 70 75 74 20 |.logging| output |
|00004fe0| 69 73 20 77 72 69 74 74 | 65 6e 20 74 6f 20 73 74 |is writt|en to st|
|00004ff0| 61 6e 64 61 72 64 20 65 | 72 72 6f 72 0a 09 42 79 |andard e|rror..By|
|00005000| 20 64 65 66 61 75 6c 74 | 2c 20 6c 6f 67 67 69 6e | default|, loggin|
|00005010| 67 20 6f 75 74 70 75 74 | 20 67 6f 65 73 20 74 6f |g output| goes to|
|00005020| 20 4c 47 5f 4f 55 54 44 | 45 46 2e 20 20 54 6f 20 | LG_OUTD|EF. To |
|00005030| 73 70 65 63 69 66 79 20 | 61 6e 6f 74 68 65 72 0a |specify |another.|
|00005040| 09 70 6c 61 63 65 2c 20 | 73 61 79 0a 09 09 4c 4f |.place, |say...LO|
|00005050| 47 54 59 50 45 3a 09 74 | 79 70 65 2c 74 79 70 65 |GTYPE:.t|ype,type|
|00005060| 2c 2e 2e 2e 3c 74 61 62 | 3e 6c 6f 63 61 74 69 6f |,...<tab|>locatio|
|00005070| 6e 0a 09 53 6f 2c 0a 09 | 09 4c 4f 47 54 59 50 45 |n..So,..|.LOGTYPE|
|00005080| 3a 09 61 6c 6c 3c 74 61 | 62 3e 7c 20 6d 61 69 6c |:.all<ta|b>| mail|
|00005090| 20 73 74 61 66 66 0a 09 | 73 65 6e 64 73 20 6c 6f | staff..|sends lo|
|000050a0| 67 67 69 6e 67 20 6f 75 | 74 70 75 74 20 66 6f 72 |gging ou|tput for|
|000050b0| 20 64 65 62 75 67 67 69 | 6e 67 20 74 6f 20 22 73 | debuggi|ng to "s|
|000050c0| 74 61 66 66 22 2e 0a 0a | 3d 3d 3d 3d 3d 3d 3d 3d |taff"...|========|
|000050d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000050e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000050f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005110| 3d 3d 3d 3d 3d 0a 0a 09 | 09 70 61 73 73 20 69 66 |=====...|.pass if|
|00005120| 20 74 65 73 74 31 20 66 | 61 69 6c 73 0a 09 74 65 | test1 f|ails..te|
|00005130| 73 74 31 26 74 65 73 74 | 32 09 70 61 73 73 20 69 |st1&test|2.pass i|
|00005140| 66 20 74 65 73 74 31 20 | 61 6e 64 20 74 65 73 74 |f test1 |and test|
|00005150| 32 20 61 72 65 20 62 6f | 74 68 20 73 61 74 69 73 |2 are bo|th satis|
|00005160| 66 69 65 64 0a 09 74 65 | 73 74 31 7c 74 65 73 74 |fied..te|st1|test|
|00005170| 32 09 70 61 73 73 20 69 | 66 20 65 69 74 68 65 72 |2.pass i|f either|
|00005180| 20 74 65 73 74 31 20 6f | 72 20 74 65 73 74 32 20 | test1 o|r test2 |
|00005190| 61 72 65 20 73 61 74 69 | 73 66 69 65 64 0a 0a 49 |are sati|sfied..I|
|000051a0| 66 20 61 20 70 61 73 73 | 77 6f 72 64 20 70 61 73 |f a pass|word pas|
|000051b0| 73 65 73 20 61 6e 79 20 | 6c 69 73 74 65 64 20 74 |ses any |listed t|
|000051c0| 65 73 74 2c 20 69 74 20 | 69 73 20 72 65 6a 65 63 |est, it |is rejec|
|000051d0| 74 65 64 2e 20 20 4e 6f | 74 65 20 61 6e 79 20 6f |ted. No|te any o|
|000051e0| 66 20 21 3d 2c 20 3c 3e | 2c 0a 3c 2c 20 3e 2c 20 |f !=, <>|,.<, >, |
|000051f0| 3e 3d 2c 20 3c 3d 2c 20 | 3d 3d 20 6d 61 79 20 62 |>=, <=, |== may b|
|00005200| 70 61 73 73 77 64 2b 2f | 73 69 67 2e 63 00 00 00 |passwd+/|sig.c...|
|00005210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 31 30 30 36 | 34 34 00 00 30 30 30 31 |....1006|44..0001|
|00005270| 31 35 00 00 30 30 30 30 | 32 34 00 00 30 30 30 30 |15..0000|24..0000|
|00005280| 30 30 30 32 31 35 35 00 | 30 35 31 35 37 37 33 36 |0002155.|05157736|
|00005290| 31 35 35 00 30 30 37 35 | 32 37 00 20 30 00 00 00 |155.0075|27. 0...|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 20 20 20 20 20 30 00 | 00 00 00 00 00 00 00 00 |. 0.|........|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00005360| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 2f 2a 0a 20 2a 20 73 69 | 67 6e 61 6c 20 68 61 6e |/*. * si|gnal han|
|00005410| 64 6c 69 6e 67 0a 20 2a | 2f 0a 23 69 6e 63 6c 75 |dling. *|/.#inclu|
|00005420| 64 65 20 22 70 61 73 73 | 77 64 2e 68 22 0a 23 69 |de "pass|wd.h".#i|
|00005430| 6e 63 6c 75 64 65 20 3c | 73 69 67 6e 61 6c 2e 68 |nclude <|signal.h|
|00005440| 3e 0a 0a 2f 2a 0a 20 2a | 20 73 69 67 6e 61 6c 20 |>../*. *| signal |
|00005450| 68 61 6e 64 6c 69 6e 67 | 20 72 6f 75 74 69 6e 65 |handling| routine|
|00005460| 73 0a 20 2a 2f 0a 76 6f | 69 64 20 28 2a 74 72 61 |s. */.vo|id (*tra|
|00005470| 70 5b 4e 53 49 47 5d 29 | 28 29 3b 09 09 2f 2a 20 |p[NSIG])|();../* |
|00005480| 76 61 6c 75 65 73 20 72 | 65 74 75 72 6e 65 64 20 |values r|eturned |
|00005490| 62 79 20 73 69 67 6e 61 | 6c 28 29 20 2a 2f 0a 0a |by signa|l() */..|
|000054a0| 2f 2a 0a 20 2a 20 67 72 | 61 62 20 69 6e 69 74 69 |/*. * gr|ab initi|
|000054b0| 61 6c 20 76 61 6c 75 65 | 73 20 6f 66 20 61 6c 6c |al value|s of all|
|000054c0| 20 73 69 67 6e 61 6c 73 | 0a 20 2a 2f 0a 69 6e 69 | signals|. */.ini|
|000054d0| 74 73 69 67 28 29 0a 7b | 0a 09 72 65 67 69 73 74 |tsig().{|..regist|
|000054e0| 65 72 20 69 6e 74 20 69 | 3b 09 09 2f 2a 20 63 6f |er int i|;../* co|
|000054f0| 75 6e 74 65 72 20 69 6e | 20 61 20 66 6f 72 20 6c |unter in| a for l|
|00005500| 6f 6f 70 20 2a 2f 0a 0a | 09 66 6f 72 28 69 20 3d |oop */..|.for(i =|
|00005510| 20 30 3b 20 69 20 3c 20 | 4e 53 49 47 3b 20 69 2b | 0; i < |NSIG; i+|
|00005520| 2b 29 0a 09 09 74 72 61 | 70 5b 69 5d 20 3d 20 20 |+)...tra|p[i] = |
|00005530| 73 69 67 6e 61 6c 28 69 | 2c 20 53 49 47 5f 44 46 |signal(i|, SIG_DF|
|00005540| 4c 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 20 64 69 73 |L);.}../|*. * dis|
|00005550| 61 62 6c 65 20 41 4c 4c | 20 73 69 67 6e 61 6c 20 |able ALL| signal |
|00005560| 74 72 61 70 70 69 6e 67 | 0a 20 2a 2f 0a 73 69 67 |trapping|. */.sig|
|00005570| 6f 66 66 28 29 0a 7b 0a | 09 72 65 67 69 73 74 65 |off().{.|.registe|
|00005580| 72 20 69 6e 74 20 69 3b | 09 09 2f 2a 20 63 6f 75 |r int i;|../* cou|
|00005590| 6e 74 65 72 20 69 6e 20 | 61 20 66 6f 72 20 6c 6f |nter in |a for lo|
|000055a0| 6f 70 20 2a 2f 0a 0a 09 | 66 6f 72 28 69 20 3d 20 |op */...|for(i = |
|000055b0| 30 3b 20 69 20 3c 20 4e | 53 49 47 3b 20 69 2b 2b |0; i < N|SIG; i++|
|000055c0| 29 0a 09 09 28 76 6f 69 | 64 29 20 73 69 67 6e 61 |)...(voi|d) signa|
|000055d0| 6c 28 69 2c 20 53 49 47 | 5f 49 47 4e 29 3b 0a 7d |l(i, SIG|_IGN);.}|
|000055e0| 0a 0a 2f 2a 0a 20 2a 20 | 72 65 73 74 6f 72 65 20 |../*. * |restore |
|000055f0| 74 6f 20 74 68 65 20 69 | 6e 69 74 69 61 6c 20 73 |to the i|nitial s|
|00005600| 65 74 74 69 6e 67 20 61 | 6c 6c 20 73 69 67 6e 61 |etting a|ll signa|
|00005610| 6c 73 0a 20 2a 2f 0a 73 | 69 67 6f 6e 28 29 0a 7b |ls. */.s|igon().{|
|00005620| 0a 09 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 69 |..regist|er int i|
|00005630| 3b 09 09 2f 2a 20 63 6f | 75 6e 74 65 72 20 69 6e |;../* co|unter in|
|00005640| 20 61 20 66 6f 72 20 6c | 6f 6f 70 20 2a 2f 0a 0a | a for l|oop */..|
|00005650| 09 66 6f 72 28 69 20 3d | 20 30 3b 20 69 20 3c 20 |.for(i =| 0; i < |
|00005660| 4e 53 49 47 3b 20 69 2b | 2b 29 0a 09 09 28 76 6f |NSIG; i+|+)...(vo|
|00005670| 69 64 29 20 73 69 67 6e | 61 6c 28 69 2c 20 74 72 |id) sign|al(i, tr|
|00005680| 61 70 5b 69 5d 29 3b 0a | 0a 7d 0a 0a 23 69 66 64 |ap[i]);.|.}..#ifd|
|00005690| 65 66 20 41 4c 4c 4f 57 | 43 4f 52 45 0a 0a 2f 2a |ef ALLOW|CORE../*|
|000056a0| 0a 20 2a 20 69 66 20 79 | 6f 75 20 61 72 65 20 61 |. * if y|ou are a|
|000056b0| 6c 6c 6f 77 69 6e 67 20 | 63 6f 72 65 20 64 75 6d |llowing |core dum|
|000056c0| 70 73 2c 20 74 68 69 73 | 20 73 75 62 72 6f 75 74 |ps, this| subrout|
|000056d0| 69 6e 65 0a 20 2a 20 28 | 64 65 73 69 67 6e 65 64 |ine. * (|designed|
|000056e0| 20 74 6f 20 64 69 73 61 | 62 6c 65 20 63 6f 72 65 | to disa|ble core|
|000056f0| 20 64 75 6d 70 69 6e 67 | 29 20 69 73 20 61 20 6e | dumping|) is a n|
|00005700| 6f 2d 6f 70 0a 20 2a 2f | 0a 6e 6f 63 6f 72 65 28 |o-op. */|.nocore(|
|00005710| 29 0a 7b 0a 7d 0a 0a 23 | 65 6c 73 65 0a 0a 2f 2a |).{.}..#|else../*|
|00005720| 0a 20 2a 20 74 68 65 20 | 74 72 61 70 70 65 72 0a |. * the |trapper.|
|00005730| 20 2a 2f 0a 74 72 61 70 | 73 69 67 28 6e 29 0a 69 | */.trap|sig(n).i|
|00005740| 6e 74 20 6e 3b 0a 7b 0a | 09 63 68 61 72 20 73 69 |nt n;.{.|.char si|
|00005750| 67 6d 73 67 5b 42 55 46 | 53 49 5a 5d 3b 0a 0a 09 |gmsg[BUF|SIZ];...|
|00005760| 53 50 52 49 4e 54 46 28 | 73 69 67 6d 73 67 2c 20 |SPRINTF(|sigmsg, |
|00005770| 22 43 61 75 67 68 74 20 | 73 69 67 6e 61 6c 20 23 |"Caught |signal #|
|00005780| 25 64 20 2d 2d 20 6e 6f | 20 63 68 61 6e 67 65 2e |%d -- no| change.|
|00005790| 22 2c 20 6e 29 3b 0a 09 | 70 77 65 78 69 74 28 73 |", n);..|pwexit(s|
|000057a0| 69 67 6d 73 67 29 3b 0a | 7d 0a 0a 2f 2a 0a 20 2a |igmsg);.|}../*. *|
|000057b0| 20 74 72 61 70 20 73 69 | 67 6e 61 6c 73 20 63 61 | trap si|gnals ca|
|000057c0| 75 73 69 6e 67 20 63 6f | 72 65 20 64 75 6d 70 73 |using co|re dumps|
|000057d0| 0a 20 2a 20 61 6e 64 20 | 74 65 72 6d 69 6e 61 74 |. * and |terminat|
|000057e0| 65 20 67 72 61 63 65 66 | 75 6c 6c 79 0a 20 2a 2f |e gracef|ully. */|
|000057f0| 0a 6e 6f 63 6f 72 65 28 | 29 0a 7b 0a 09 72 65 67 |.nocore(|).{..reg|
|00005800| 69 73 74 65 72 20 69 6e | 74 20 69 3b 09 09 2f 2a |ister in|t i;../*|
|00005810| 20 63 6f 75 6e 74 65 72 | 20 69 6e 20 61 20 66 6f | counter| in a fo|
|00005820| 72 20 6c 6f 6f 70 20 2a | 2f 0a 0a 09 66 6f 72 28 |r loop *|/...for(|
|00005830| 69 20 3d 20 30 3b 20 69 | 20 3c 20 4e 53 49 47 3b |i = 0; i| < NSIG;|
|00005840| 20 69 2b 2b 29 0a 09 09 | 28 76 6f 69 64 29 20 73 | i++)...|(void) s|
|00005850| 69 67 6e 61 6c 28 69 2c | 20 74 72 61 70 73 69 67 |ignal(i,| trapsig|
|00005860| 29 3b 0a 7d 0a 0a 23 65 | 6e 64 69 66 0a 0a 09 7c |);.}..#e|ndif...||
|00005870| 20 20 20 7c 20 20 20 20 | 20 20 20 2b 2d 2d 2d 2d | | | +----|
|00005880| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005890| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 20 69 67 6e |--------|---- ign|
|000058a0| 6f 72 65 64 0a 09 7c 20 | 20 20 2b 2d 2d 2d 2d 2d |ored..| | +-----|
|000058b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000058c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000058d0| 2d 2d 2d 20 63 6f 6d 70 | 6c 65 6d 65 6e 74 0a 09 |--- comp|lement..|
|000058e0| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |+-------|--------|
|000058f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 20 62 65 |--------|----- be|
|00005910| 67 69 6e 20 65 73 63 61 | 70 65 20 73 65 71 75 65 |gin esca|pe seque|
|00005920| 6e 63 65 0a 48 65 72 65 | 2c 20 77 69 74 68 20 61 |nce.Here|, with a|
|00005930| 6c 6c 20 6e 75 6d 62 65 | 72 73 20 65 78 63 65 70 |ll numbe|rs excep|
|00005940| 74 20 22 25 76 22 2c 20 | 63 6f 6d 70 6c 65 6d 65 |t "%v", |compleme|
|00005950| 6e 74 61 74 69 6f 6e 20 | 6d 65 61 6e 73 20 74 68 |ntation |means th|
|00005960| 65 20 72 65 6c 65 76 61 | 6e 74 20 6e 75 6d 62 65 |e releva|nt numbe|
|00005970| 72 0a 69 73 20 73 75 62 | 74 72 61 63 74 65 64 20 |r.is sub|tracted |
|00005980| 66 72 6f 6d 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |from the| length |
|00005990| 6f 66 20 74 68 65 20 70 | 61 73 73 77 6f 72 64 20 |of the p|assword |
|000059a0| 28 77 68 65 72 65 20 6c | 65 6e 67 74 68 20 69 73 |(where l|ength is|
|000059b0| 20 74 68 65 20 6c 65 73 | 73 65 72 20 6f 66 0a 74 | the les|ser of.t|
|000059c0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 68 61 |he numbe|r of cha|
|000059d0| 72 61 63 74 65 72 73 20 | 69 6e 20 74 68 65 20 70 |racters |in the p|
|000059e0| 61 73 73 77 6f 72 64 20 | 61 6e 64 20 74 68 65 20 |assword |and the |
|000059f0| 6e 75 6d 62 65 72 20 6f | 66 20 73 69 67 6e 69 66 |number o|f signif|
|00005a00| 70 61 73 73 77 64 2b 2f | 73 79 73 2e 68 00 00 00 |passwd+/|sys.h...|
|00005a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a60| 00 00 00 00 31 30 30 36 | 34 34 00 00 30 30 30 31 |....1006|44..0001|
|00005a70| 31 35 00 00 30 30 30 30 | 32 34 00 00 30 30 30 30 |15..0000|24..0000|
|00005a80| 30 30 31 33 32 33 35 00 | 30 35 32 30 36 37 33 35 |0013235.|05206735|
|00005a90| 33 35 36 00 30 30 37 35 | 36 36 00 20 30 00 00 00 |356.0075|66. 0...|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 20 20 20 20 20 30 00 | 00 00 00 00 00 00 00 00 |. 0.|........|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 20 31 00 20 30 00 |........|.. 1. 0.|
|00005b60| 20 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 2f 2a 0a 20 2a 20 73 79 | 73 74 65 6d 20 64 65 70 |/*. * sy|stem dep|
|00005c10| 65 6e 64 65 6e 63 69 65 | 73 0a 20 2a 0a 20 2a 20 |endencie|s. *. * |
|00005c20| 77 68 61 74 20 79 6f 75 | 20 6e 65 65 64 20 74 6f |what you| need to|
|00005c30| 20 64 65 66 69 6e 65 3a | 0a 20 2a 0a 20 2a 20 42 | define:|. *. * B|
|00005c40| 41 53 49 43 20 53 59 53 | 54 45 4d 20 49 44 45 4e |ASIC SYS|TEM IDEN|
|00005c50| 54 49 54 59 0a 20 2a 09 | 42 53 44 34 5f 32 09 09 |TITY. *.|BSD4_2..|
|00005c60| 66 6f 72 20 76 61 6e 69 | 6c 6c 61 20 34 2e 32 20 |for vani|lla 4.2 |
|00005c70| 42 53 44 20 73 79 73 74 | 65 6d 73 0a 20 2a 09 42 |BSD syst|ems. *.B|
|00005c80| 53 44 34 5f 33 09 09 66 | 6f 72 20 76 61 6e 69 6c |SD4_3..f|or vanil|
|00005c90| 6c 61 20 34 2e 33 20 42 | 53 44 20 73 79 73 74 65 |la 4.3 B|SD syste|
|00005ca0| 6d 73 0a 20 2a 09 53 59 | 53 56 09 09 66 6f 72 20 |ms. *.SY|SV..for |
|00005cb0| 76 61 6e 69 6c 6c 61 20 | 53 79 73 74 65 6d 20 56 |vanilla |System V|
|00005cc0| 20 73 79 73 74 65 6d 73 | 0a 20 2a 09 53 55 4e 09 | systems|. *.SUN.|
|00005cd0| 09 66 6f 72 20 53 75 6e | 20 33 2e 30 20 4f 53 20 |.for Sun| 3.0 OS |
|00005ce0| 6f 6e 20 61 20 63 6c 69 | 65 6e 74 0a 20 2a 20 49 |on a cli|ent. * I|
|00005cf0| 66 20 6f 6e 65 20 6f 66 | 20 74 68 65 73 65 20 69 |f one of| these i|
|00005d00| 73 20 73 65 74 2c 20 65 | 76 65 72 79 74 68 69 6e |s set, e|verythin|
|00005d10| 67 20 65 6c 73 65 20 69 | 73 20 64 6f 6e 65 20 61 |g else i|s done a|
|00005d20| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 2e 0a 20 2a |utomatic|ally.. *|
|00005d30| 20 4e 6f 74 65 3a 20 79 | 6f 75 72 20 73 79 73 74 | Note: y|our syst|
|00005d40| 65 6d 20 6d 75 73 74 20 | 62 65 20 76 61 6e 69 6c |em must |be vanil|
|00005d50| 6c 61 20 66 6f 72 20 74 | 68 65 73 65 20 74 6f 20 |la for t|hese to |
|00005d60| 77 6f 72 6b 3b 20 66 6f | 72 20 65 78 61 6d 70 6c |work; fo|r exampl|
|00005d70| 65 2c 0a 20 2a 20 61 20 | 53 75 6e 20 69 73 20 6e |e,. * a |Sun is n|
|00005d80| 6f 74 20 76 61 6e 69 6c | 6c 61 20 34 2e 33 20 28 |ot vanil|la 4.3 (|
|00005d90| 6f 72 20 34 2e 32 20 66 | 6f 72 20 74 68 61 74 20 |or 4.2 f|or that |
|00005da0| 6d 61 74 74 65 72 29 20 | 73 69 6e 63 65 20 69 74 |matter) |since it|
|00005db0| 20 75 73 65 73 0a 20 2a | 20 61 20 53 79 73 74 65 | uses. *| a Syste|
|00005dc0| 6d 20 56 20 70 61 73 73 | 77 6f 72 64 20 66 75 6e |m V pass|word fun|
|00005dd0| 63 74 69 6f 6e 2c 20 66 | 67 65 74 70 77 65 6e 74 |ction, f|getpwent|
|00005de0| 28 29 2e 0a 20 2a 0a 20 | 2a 20 41 4c 54 45 52 4e |().. *. |* ALTERN|
|00005df0| 41 54 45 20 43 41 50 41 | 42 49 4f 4c 49 54 49 45 |ATE CAPA|BIOLITIE|
|00005e00| 53 0a 20 2a 09 43 48 46 | 4e 09 09 69 66 20 79 6f |S. *.CHF|N..if yo|
|00005e10| 75 72 20 6d 61 63 68 69 | 6e 65 20 75 73 65 73 20 |ur machi|ne uses |
|00005e20| 74 68 65 20 70 61 73 73 | 77 64 20 63 6f 6d 6d 61 |the pass|wd comma|
|00005e30| 6e 64 20 74 6f 20 61 6c | 6c 6f 77 20 75 73 65 72 |nd to al|low user|
|00005e40| 73 0a 20 2a 09 09 09 74 | 6f 20 63 68 61 6e 67 65 |s. *...t|o change|
|00005e50| 20 74 68 65 69 72 20 66 | 69 6e 67 65 72 20 69 6e | their f|inger in|
|00005e60| 66 6f 72 6d 61 74 69 6f | 6e 2c 20 64 65 66 69 6e |formatio|n, defin|
|00005e70| 65 20 74 68 69 73 0a 20 | 2a 09 47 45 54 55 53 45 |e this. |*.GETUSE|
|00005e80| 52 53 48 45 4c 4c 09 69 | 66 20 79 6f 75 72 20 6d |RSHELL.i|f your m|
|00005e90| 61 63 68 69 6e 65 20 75 | 73 65 73 20 74 68 65 20 |achine u|ses the |
|00005ea0| 70 61 73 73 77 64 20 63 | 6f 6d 6d 61 6e 64 20 74 |passwd c|ommand t|
|00005eb0| 6f 20 61 6c 6c 6f 77 20 | 75 73 65 72 73 0a 20 2a |o allow |users. *|
|00005ec0| 09 09 09 74 6f 20 63 68 | 61 6e 67 65 20 74 68 65 |...to ch|ange the|
|00005ed0| 69 72 20 6c 6f 67 69 6e | 20 73 68 65 6c 6c 2c 20 |ir login| shell, |
|00005ee0| 73 65 74 20 74 68 69 73 | 20 74 6f 20 74 68 65 20 |set this| to the |
|00005ef0| 66 75 6e 63 74 69 6f 6e | 0a 20 2a 09 09 09 74 68 |function|. *...th|
|00005f00| 61 74 20 72 65 74 75 72 | 6e 73 20 76 61 6c 69 64 |at retur|ns valid|
|00005f10| 20 75 73 65 72 20 73 68 | 65 6c 6c 73 2e 20 20 54 | user sh|ells. T|
|00005f20| 68 65 20 63 61 6c 6c 69 | 6e 67 20 73 65 71 75 65 |he calli|ng seque|
|00005f30| 6e 63 65 0a 20 2a 09 09 | 09 69 73 20 74 6f 20 70 |nce. *..|.is to p|
|00005f40| 61 73 73 20 6e 6f 20 61 | 72 67 75 6d 65 6e 74 73 |ass no a|rguments|
|00005f50| 2c 20 61 6e 64 20 65 61 | 63 68 20 63 61 6c 6c 20 |, and ea|ch call |
|00005f60| 69 73 20 65 78 70 65 63 | 74 65 64 20 74 6f 0a 20 |is expec|ted to. |
|00005f70| 2a 09 09 09 72 65 74 75 | 72 6e 20 61 20 73 74 72 |*...retu|rn a str|
|00005f80| 69 6e 67 20 77 69 74 68 | 20 74 68 65 20 6e 61 6d |ing with| the nam|
|00005f90| 65 20 6f 66 20 61 20 76 | 61 6c 69 64 20 75 73 65 |e of a v|alid use|
|00005fa0| 72 20 73 68 65 6c 6c 20 | 69 6e 0a 20 2a 09 09 09 |r shell |in. *...|
|00005fb0| 69 74 2c 20 6f 72 20 4e | 55 4c 4c 20 6d 65 61 6e |it, or N|ULL mean|
|00005fc0| 69 6e 67 20 65 6e 64 20 | 6f 66 20 6c 69 73 74 2e |ing end |of list.|
|00005fd0| 0a 20 2a 20 54 68 65 73 | 65 20 6c 65 74 20 79 6f |. * Thes|e let yo|
|00005fe0| 75 20 61 6c 74 65 72 20 | 6f 74 68 65 72 20 66 69 |u alter |other fi|
|00005ff0| 65 6c 64 73 20 6f 66 20 | 74 68 65 20 70 61 73 73 |elds of |the pass|
|00006000| 77 6f 72 64 20 66 69 6c | 65 2e 20 20 55 73 65 66 |word fil|e. Usef|
|00006010| 75 6c 2e 0a 20 2a 0a 20 | 2a 20 50 41 53 53 57 4f |ul.. *. |* PASSWO|
|00006020| 52 44 20 46 49 4c 45 20 | 46 4f 52 4d 41 54 0a 20 |RD FILE |FORMAT. |
|00006030| 2a 09 41 47 45 5f 46 49 | 45 4c 44 09 73 65 74 20 |*.AGE_FI|ELD.set |
|00006040| 74 68 69 73 20 69 66 20 | 74 68 65 20 70 61 73 73 |this if |the pass|
|00006050| 77 6f 72 64 20 73 74 72 | 75 63 74 75 72 65 20 28 |word str|ucture (|
|00006060| 73 65 65 20 67 65 74 70 | 77 65 6e 74 28 33 29 0a |see getp|went(3).|
|00006070| 20 2a 09 09 09 69 6e 20 | 74 68 65 20 6d 61 6e 75 | *...in |the manu|
|00006080| 61 6c 29 20 68 61 73 20 | 74 68 65 20 66 69 65 6c |al) has |the fiel|
|00006090| 64 20 22 70 77 5f 61 67 | 65 22 2e 0a 20 2a 0a 20 |d "pw_ag|e".. *. |
|000060a0| 2a 20 41 4c 54 45 52 4e | 41 54 45 20 50 41 53 53 |* ALTERN|ATE PASS|
|000060b0| 57 4f 52 44 20 46 49 4c | 45 0a 20 2a 09 46 47 45 |WORD FIL|E. *.FGE|
|000060c0| 54 50 57 45 4e 54 09 64 | 65 66 69 6e 65 20 74 68 |TPWENT.d|efine th|
|000060d0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 74 6f 20 74 |is funct|ion to t|
|000060e0| 61 6b 65 20 61 20 46 49 | 4c 45 20 70 6f 69 6e 74 |ake a FI|LE point|
|000060f0| 65 72 20 74 6f 20 74 68 | 65 0a 20 2a 09 09 09 70 |er to th|e. *...p|
|00006100| 61 73 73 77 6f 72 64 20 | 66 69 6c 65 2c 20 61 6e |assword |file, an|
|00006110| 64 20 72 65 74 75 72 6e | 20 73 75 63 63 65 73 73 |d return| success|
|00006120| 69 76 65 20 65 6e 74 72 | 69 65 73 20 69 6e 20 74 |ive entr|ies in t|
|00006130| 68 65 0a 20 2a 09 09 09 | 70 61 73 73 77 6f 72 64 |he. *...|password|
|00006140| 20 66 69 6c 65 73 20 28 | 6f 72 20 4e 55 4c 4c 20 | files (|or NULL |
|00006150| 77 68 65 6e 20 74 68 65 | 72 65 20 61 72 65 20 6e |when the|re are n|
|00006160| 6f 20 6d 6f 72 65 29 0a | 20 2a 09 53 45 54 50 57 |o more).| *.SETPW|
|00006170| 46 49 4c 45 09 64 65 66 | 69 6e 65 20 74 68 69 73 |FILE.def|ine this|
|00006180| 20 74 6f 20 74 61 6b 65 | 20 74 68 65 20 6e 61 6d | to take| the nam|
|00006190| 65 20 6f 66 20 74 68 65 | 20 70 61 73 73 77 6f 72 |e of the| passwor|
|000061a0| 64 20 66 69 6c 65 0a 20 | 2a 09 09 09 61 73 20 69 |d file. |*...as i|
|000061b0| 74 73 20 73 69 6e 67 6c | 65 20 61 72 67 75 6d 65 |ts singl|e argume|
|000061c0| 6e 74 3b 20 69 74 20 72 | 65 74 75 72 6e 73 20 6e |nt; it r|eturns n|
|000061d0| 6f 74 68 69 6e 67 2c 20 | 62 75 74 20 61 6c 6c 0a |othing, |but all.|
|000061e0| 20 2a 09 09 09 66 75 74 | 75 72 65 20 63 61 6c 6c | *...fut|ure call|
|000061f0| 73 20 74 6f 20 67 65 74 | 70 77 6e 61 6d 20 61 6e |s to get|pwnam an|
|00006200| 64 20 67 65 74 70 77 75 | 69 64 20 67 65 74 20 74 |d getpwu|id get t|
|00006210| 68 65 20 65 6e 74 72 69 | 65 73 0a 20 2a 09 09 09 |he entri|es. *...|
|00006220| 66 72 6f 6d 20 74 68 69 | 73 20 66 69 6c 65 20 61 |from thi|s file a|
|00006230| 6e 64 20 6e 6f 74 20 74 | 68 65 20 64 65 66 61 75 |nd not t|he defau|
|00006240| 6c 74 20 6f 6e 65 2e 0a | 20 2a 20 44 65 66 69 6e |lt one..| * Defin|
|00006250| 65 20 6f 6e 6c 79 20 6f | 6e 65 20 6f 66 20 74 68 |e only o|ne of th|
|00006260| 65 73 65 20 28 42 53 44 | 20 73 79 73 74 65 6d 73 |ese (BSD| systems|
|00006270| 20 75 73 65 20 74 68 65 | 20 6c 61 74 74 65 72 2c | use the| latter,|
|00006280| 20 53 79 73 74 65 6d 20 | 56 20 74 68 65 20 66 6f | System |V the fo|
|00006290| 72 6d 65 72 29 2e 0a 20 | 2a 20 4c 6f 6f 6b 20 69 |rmer).. |* Look i|
|000062a0| 6e 20 74 68 65 20 6d 61 | 6e 75 61 6c 20 65 6e 74 |n the ma|nual ent|
|000062b0| 72 79 20 66 6f 72 20 67 | 65 74 70 77 65 6e 74 28 |ry for g|etpwent(|
|000062c0| 29 20 74 6f 20 77 68 69 | 63 68 20 6f 6e 65 20 74 |) to whi|ch one t|
|000062d0| 6f 20 75 73 65 2e 20 20 | 49 66 20 6e 6f 20 73 75 |o use. |If no su|
|000062e0| 63 68 0a 20 2a 20 66 75 | 6e 63 74 69 6f 6e 20 69 |ch. * fu|nction i|
|000062f0| 73 20 67 69 76 65 6e 2c | 20 79 6f 75 27 72 65 20 |s given,| you're |
|00006300| 73 74 75 63 6b 20 2d 2d | 20 79 6f 75 20 63 61 6e |stuck --| you can|
|00006310| 27 74 20 75 73 65 20 61 | 6e 20 61 6c 74 65 72 6e |'t use a|n altern|
|00006320| 61 74 65 20 66 69 6c 65 | 2e 0a 20 2a 20 64 6f 6e |ate file|.. * don|
|00006330| 27 74 20 64 65 66 69 6e | 65 20 65 69 74 68 65 72 |'t defin|e either|
|00006340| 2e 0a 20 2a 0a 20 2a 20 | 53 59 53 54 45 4d 20 4c |.. *. * |SYSTEM L|
|00006350| 49 42 52 41 52 49 45 53 | 0a 20 2a 09 53 59 53 4c |IBRARIES|. *.SYSL|
|00006360| 4f 47 09 09 73 65 74 20 | 74 6f 20 6c 69 62 72 61 |OG..set |to libra|
|00006370| 72 79 20 74 6f 20 6c 6f | 61 64 20 73 79 73 6c 6f |ry to lo|ad syslo|
|00006380| 67 28 33 29 2c 20 6f 70 | 65 6e 6c 6f 67 28 33 29 |g(3), op|enlog(3)|
|00006390| 2c 20 61 6e 64 0a 20 2a | 09 09 09 63 6c 6f 73 65 |, and. *|...close|
|000063a0| 6c 6f 67 28 33 29 20 66 | 72 6f 6d 3b 20 69 66 20 |log(3) f|rom; if |
|000063b0| 73 74 61 6e 64 61 72 64 | 20 43 20 6c 69 62 72 61 |standard| C libra|
|000063c0| 72 79 2c 20 6a 75 73 74 | 20 64 65 66 69 6e 65 0a |ry, just| define.|
|000063d0| 20 2a 09 09 09 69 74 3b | 20 69 66 20 6e 6f 74 20 | *...it;| if not |
|000063e0| 61 76 61 69 6c 61 62 6c | 65 2c 20 64 6f 6e 27 74 |availabl|e, don't|
|000063f0| 20 64 65 66 69 6e 65 20 | 69 74 0a 20 2a 09 44 42 | define |it. *.DB|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.